[pmwiki-devel] objectizing pagelist?
Patrick R. Michaud
pmichaud at pobox.com
Thu Nov 8 13:52:23 CST 2007
On Thu, Nov 08, 2007 at 02:33:17PM -0500, Stirling Westrup wrote:
> Patrick R. Michaud wrote:
>
> > Hope this helps explain why I haven't tried to unify
> > pagelist/attachlist in the codebase. Ultimately I find there
> > are just too many differences in the underlying data components
> > to make a single routine have that much benefit.
>
> Thanks. Its always helpful to have your take on these things. So maybe I'll
> try to write a parallel attachlist that re-uses some of the pagelist stuff for
> output purposes. I'll let you know if I run into any major problems re-using
> the pagelist code.
Personally, I'd be very surprised if any of the _pagelist_ code is
very helpful here. The algorithms may be useful, but I wouldn't think
that calls to the code would be all that helpful.
The functions that I think are going to be most helpful are:
FmtTemplateVars() -- replace occurrences of {$$key} in a template
RetrieveAuthSection() -- retrieve a section of another page (e.g.,
from a fmt= parameter)
There's not any generic code for handling (:template first ... :)
(:template each ...:) yet, but I've been considering factoring it
out into a common set of subroutines. But even if we do that,
there's still the issue of figuring out how to handle expressions
like {<$...}, {=$...}, and {>$...} for things that aren't really
page variables. Currently that's a very _pagelist_ specific
thing because '<', '=', and '>' get replaced by pagenames and
transate into calls to PageVar() .
Pm
More information about the pmwiki-devel
mailing list