[pmwiki-users] working with page variables

Dominique Faure dominique.faure at gmail.com
Wed May 17 08:36:23 CDT 2006


On 5/17/06, Marco Ferretti <marco.ferretti at gmail.com> wrote:
> Hi all,
>
> I am trying to understand how variables work, specially, when they can be used
> inside a page. Thanks to Hans I managed to have my event handler using his
> BlogSimple cookbook.  In the modified php file now there's a EventDate
> declared as
>
> $FmtPV['$EventDate'] = 'StripName($pagename)';
>
> And I thought of formatting it to use in pagelist .  So I tried
> #$FmtPV['$EventRealDate'] = 'strftime("%Y-%m-%d",$EventDate)';
>
> but using {=$EventRealDate} in wikipages results in nothing ( maybe an empty
> space... didn't check out ) .
>
> I then tried
> #$FmtPV['$EventRealDate'] = 'strftime("%Y-%m-%d",$page("EventDate"))';
> just to be sure I wasn't wasting your time.
>
> I even tried passing StripName($pagename) as the second argument of strftime,
> with the same result.
>
> Now, since StripName($pagename) ALWAYS returns a string of the form yyyymmdd
> (because the first part of the page name is inserted in that form by the
> system, thus holding a number ) I was wondering : how do I format it ??
>
> In general , when is
> $FmtPV['$EventDate'] = 'StripName($pagename)';
> being computed and when can I use the variable in the file ?
>
> hope this is not OT.
>
> TIA
>
> Marco
>

May be http://www.pmwiki.org/wiki/Cookbook/PageVariableExtensions
could help you...

Regards,
Dom




More information about the pmwiki-users mailing list