[pmwiki-users] Great pagelist question...

Dominique Faure dominique.faure at gmail.com
Wed Aug 30 11:17:07 CDT 2006


On 8/30/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, Aug 30, 2006 at 05:10:44PM +0200, Dominique Faure wrote:
> > On 8/30/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > At the same time, could you please parametrize the variable evaluation
> > of pagelist template:
> > [...] More precisely and
> > refering to the code above, I was thinking of something like:
> >
> >    global $FPLTemplateReplace;
> >    ...
> >    SDVA($FPLTemplateReplace, array(
> >    '' => array('pat' => '/\\{(=|&[lg]t;)(\\$\\w+)\\}/e',
> >                'rep' => "PageVar(\$pn, '$2', '$1')",
> >               ),
> >    ));
>
> How about something like...?
>
>     SDVA($FPLTemplateReplacePattern,
>       array('/\\{(=|&[lg]t;)(\\$\\w+)\\}/e' => "PageVar(\$pn, '$2', '$1')"));
>

It's up to you [1].

Some questions in order to clarify things a bit (at least for me):

Having '^Properties' in pages would be a very nice way to initialize
page variables so why having two kind of "variables" accessor in pages
{$FullName} and {$:Something}, since semantically, they are both page
attributes?

Practically speaking, how do you want the PageVariableExtensions
recipe to be integrated into this scheme?

Dom

[1] The "$item = preg_replace($r['pat'], $r['rep'], $item);" was in
fact just a tip of the hat to the Markup function itself ;-) (weird
sense of humor?)




More information about the pmwiki-users mailing list