[pmwiki-users] pagelist for group default pages
Patrick R. Michaud
pmichaud at pobox.com
Thu Nov 8 09:35:47 CST 2007
On Thu, Nov 08, 2007 at 03:12:30PM +0000, Hans wrote:
> Thursday, November 8, 2007, 2:18:39 PM, Patrick R. Michaud wrote:
>
> > Oh. How about...?
>
> > (:pagelist if="equal {=$Group} {=$Name}":)
>
> Yes this works.
>
> >> It is easy to pick out only *.HomePage pages, but not xxx.xxx matches
> >> of group and name part. What does (:template first {=$Group}:) do?
>
> > It says to process only the first page encountered in each group.
> > Effectively it's an easy way to get a list of groups.
>
> so using
>
> (:pagelist if="equal {=$Group} {=$Name}" fmt=#groupdefaults:)
>
> [[#groupdefaults]]
> (:template first {=$Group}:)
> * [[{=$Group}/| {=$Titlespaced}]]
> [[#groupdefaultsend]]
>
> should be quicker than lets say get a list of HomePage pages
>
> with
> (:pagelist name=HomePage fmt=#title:) ?
Getting the list of HomePage matches is quicker here.
In general, the name= option to pagelist should be very fast --
certainly faster than using the if= option (which requires evaluating
the markup expression on every candidate page in the pagelist).
> I know this is a duifferen setup of default pages, I just like to know
> which method will be fastest, when the wiki page numbers go high.
>
> A third scenario is
>
> (:pagelist name=HomePage fmt=#groupdefaults:)
>
> with the template above.
This third scenario would not display any groups that don't have
a page named "HomePage".
> Are there differences in performance with any of these three?
If all of the groups' home pages are named 'HomePage', then using
name=HomePage should be fastest. Second fastest will be to use the
if= option, third fastest is (currently) the template.
There's been some discussion about having some sort of option to
pagelist that returns a list of groups' home pages, but I haven't
figured out what this option should be yet.
Pm
More information about the pmwiki-users
mailing list