[pmwiki-users] pagelist template brainstorming
marc
gmane at auxbuss.com
Sun Feb 18 05:20:20 CST 2007
Patrick R. Michaud said...
> Today I had an idea about improving pagelist templates
>
> ||!Page ||!Author ||!Modified ||
> (:each {=$Group}:)
> ||{=$Group} ||||||
> (:each:)
> ||{=$FullName} ||{=$LastModifiedBy} ||{=$LastModified} ||
> (:last:)
> {$$PageCount} pages.
> [[#templateend]]
>
> Here, (:each {=$Group}:) says to output the markup that follows
> for every page where {=$Group} results in a value different from
> the previous iteration. With this formulation our 1000 page, 10 group
> list now produces 2 + 10*1 + 1000*1 + 1 == 1013 lines of markup, far
> less than 9000 lines of the original template.
>
> Does this approach and markup make sense to others?
It certainly does. I don't use pagelist much, but every time I do I find
myself relearning the syntax; the proposed syntax is much more
intuitive, at least to me it is. Obviously, the speed increase is a good
thing.
> While we're on the topic, another desirable feature we can introduce
> with this approach would be the ability to set default pagelist
> options from within a pagelist template itself.
Excellent.
> So, again my questions are: Would markups such as these make it
> easier or more difficult for people creating pagelist templates?
Oh, easier, definitely easier.
--
Cheers,
Marc
More information about the pmwiki-users
mailing list