[pmwiki-users] NewPageBoxPlus and template question
Jan Erik Moström
lists at mostrom.pp.se
Sun Jun 17 07:36:51 CDT 2007
I'm using newpageboxplus like this
(:newpagebox value="Page name" label="New note"
template=Notes.Template :)
and it works just fine but I would like to modify it a little
bit by prefixing the name that is entered into the edit field.
In other words if "Summer" is entered in the box, the new page
should be named "TTTTSummer". If I understood the documentation
correctly I should be able to use the prefix parameter like this
(:newpagebox prefix="TTTT" value="Page name" label="New note"
template=Notes.Template :)
but when I try this the page gets the name "Summer". Have I
misunderstood something of how the prefix parameter works?
What I really want to do is two things, prefix the page with the
current date, so the page should be named for example
"2007-06-17_Summer" and the new page that is created from the
template should have todays date inserted a certain places. This
I tried to fix by defining:
$FmtPV['$PageCreationDate'] = 'strftime("%Y-%m-%d", $page["ctime"])';
and then use {$PageCreationDate} in the template ... but that of
course doesn't really do what I want to do (replacing the
command string with a date string).
I don't really know what I'm doing but try to put together the
stuff I want by trying out stuff, so any hints, advice how to do
this are appreciated.
jeme
More information about the pmwiki-users
mailing list