Chris Smith wrote:
$ID is the namespace+page name. It doesn't have any "[" or "]" if you just want the page and not the name space, then use noNS($ID).hi,
so it should be something like this:
main.php:
<div class="print_only"> <?php $string = "$ID"; $string = str_replace("[","",$string); $string = str_replace("]","",$string); $string = explode(":",$string); $laatste = end($string); echo "$laatste"; ?> </div>
layout.css:
.print_only {display:none;}
(I assume $ID is the path of the page?? or not?)
This should work you think??
koko
e.g.
<?php echo noNS($ID)?>
to be safe you should probably filter the output through hsc() to ensure any html special characters are converted to entities. Its not really necessary as a dokuwiki ID is may not contain any special charaters,but if that were to change you would be safe using ...
<?php echo hsc(noNS($ID))?>
Chris
hi,
Would it be usefull to make a plugin of it, or not??
koko
-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist