[pmwiki-users] Pagelists, adjunct data pages & variable sort orders

Dominique Faure dominique.faure at gmail.com
Fri Oct 20 12:10:43 CDT 2006


On 10/20/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, Oct 18, 2006 at 11:56:24AM +0200, Dominique Faure wrote:
> > >
> > >Oh, sorry, I had the second argument to PageTextVar() incorrect --
> > >the $: should be omitted from the argument.  Try the following instead
> > >(tested on pmwiki.org):
> > >
> > >    $FmtPV['$Year'] =
> > >      "PageTextVar('Data-'.MakeBaseName(\$pn), 'Year')";
> > >
> > >    $FmtPV['$Work'] =
> > >      "PageTextVar('Data-'.MakeBaseName(\$pn), 'Work')";
> > >
> > >    $FmtPV['$WAuthor'] =
> > >      "PageTextVar('Data-'.MakeBaseName(\$pn), 'WAuthor')";
> > >
> > >I've also replaced the recursive call to PageVar(...) with
> > >a direct call to MakeBaseName() -- this should also be an
> > >improvement.
> > >
> >
> > Couldn't this being "automated" in the (:pagelist:) directive?
> > Having the
> >
> >  $FmtPV['$MyVar'] = "PageTextVar(MakeBaseName(\$pn), 'MyVar')";
> >
> > being done when a variable reference is detected during the
> > order=...,$MyVar,... option parsing.
>
> Yes, as long as you always want to get the page text variable
> from the basename page, and not from another page.  In Crisses'
> case we want to get the page text variables out of the Data-*
> pages.
>

Perhaps with the help of a basename='...' option. In fact, I found
that a nice way to build PITS report arrays, no?

Dom




More information about the pmwiki-users mailing list