[pmwiki-users] Pagelists, adjunct data pages & variable sort orders
Patrick R. Michaud
pmichaud at pobox.com
Thu Oct 19 22:01:50 CDT 2006
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.
Pm
More information about the pmwiki-users
mailing list