Hi,
#1 of all: Dokuwiki is great!
I had this phenomena just in combo with the addnewpage plugin plus newpagetemplate plugin for custom templates:
===== @CURNS@ does not work =====
{{NEWPAGE>:custom:namespace#:custom:template}}
===== @CURNS@ works with default __template.txt =====
{{NEWPAGE>:custom:namespace}}
The newpagetemplate plugin does not supprt @CURNS@
. But with following code inside lib/plugin/newpagetemplate/action.php
(line 94) it is processing the replacement:
$tpl = str_replace(array(
'@ID@',
'@NS@',
'@CURNS@',
'@!CURNS@',
'@!!CURNS@',
'@!CURNS!@',
'@FILE@',
'@!FILE@',
'@!FILE!@',
'@PAGE@',
'@!PAGE@',
'@!!PAGE@',
'@!PAGE!@',
'@USER@',
'@NAME@',
'@MAIL@',
'@DATE@',
'@EVENT@'
),
array(
$ID,
getNS($ID),
curNS($ID),
\dokuwiki\Utf8\PhpString::ucfirst(curNS($ID)),
\dokuwiki\Utf8\PhpString::ucwords(curNS($ID)),
\dokuwiki\Utf8\PhpString::strtoupper(curNS($ID)),
$file,
utf8_ucfirst($file),
utf8_strtoupper($file),
$page,
utf8_ucfirst($title),
utf8_ucwords($title),
utf8_strtoupper($title),
$_SERVER['REMOTE_USER'],
$INFO['userinfo']['name'],
$INFO['userinfo']['mail'],
$conf['dformat'],
$event->name ,
), $tpl);
Just add the 4 lines between @NS@
and @FILE@
and also 4 lines in array below respectively according to default inc/common.php
. Also note the captital $ID
here.
I am no php coder, so i don't know possible side effects.. but hey, it works 🙂
For default templating it worked as expected here with current stable hogfather.