[pmwiki-users] 2.2.0-beta36 release (pagelist template updates)
Patrick R. Michaud
pmichaud at pobox.com
Sun Mar 18 02:34:58 CDT 2007
On Sun, Mar 18, 2007 at 08:24:03AM +0100, SteP wrote:
> It's actually beta 37 that I'm testing now. This template insists on
> including page Group.Group even though that page should be excluded by the
> defaults section.
>
> !!!include Group pages by title excluding Group.Group
> >>comment<<
> [[#includegrouppages]]
> (:template defaults name=-{=$Group},-RecentChanges list=simple order=title
> :)
Alas, it doesn't work this way. At the time that (:template defaults ...:)
is read, we haven't built the pagelist yet, so {=$Group} doesn't
have a value yet. In fact, I don't think it's possible to reliably
use any form of page variable within a (:template default:), at
least not yet.
In general there's not a way to use the name= parameter to
mean "exclude pages with the same name as the group". For that
one probably needs a special list= parameter. I suggest the
following template:
[[#includegrouppages]]
(:template list=normal order=title:)
(:if ! equal {=$Group} {=$Name}:)
!!{=$Titlespaced}
(:include {=$FullName} :)
[[#includegrouppagesend]]
Here the (:if ...:) directive takes care of excluding any
pages that are named the same as the group.
Pm
More information about the pmwiki-users
mailing list