[pmwiki-users] Re: (:include:) like <!--wiki:put_your_pagenames_here-->
Hans
design at flutesong.fsnet.co.uk
Fri Aug 19 16:39:37 CDT 2005
Friday, August 19, 2005, 8:06:49 PM, Bronwyn wrote:
> Sadly, I'm not having much luck with this:
> (:if exist {$Group}.SideBar:)(:include {$Group}.SideBar:)
> (:if !exist {$Group}.SideBar:)(:include {$SiteGroup}.SideBar:)
> (:if !exist {$SiteGroup}.SideBar:)(:include Site.SideBar:)
> (:ifend:)
Definition:
$Conditions['exists'] = "PageExists(\$condparm)";
So you need to write (:if exists Group.Name:)
Sorry I wrote (:if exist ....
Maybe the definition should be changed to
$Conditions['exist'] = "PageExists(\$condparm)";
So, after changing the definition, back to your code:
> (:if exist {$Group}.SideBar:)(:include {$Group}.SideBar:)
This can be replaced simply with
(:include {$Group}.SideBar:)
since the include will only include the group's SideBar if there is
one :)
> (:if !exist {$Group}.SideBar:)(:include {$SiteGroup}.SideBar:)
> (:if !exist {$SiteGroup}.SideBar:)(:include Site.SideBar:)
I think the last line should go.
If there is a Group.SideBar then $SiteGroup.SideBar will not be
included, fair enough.
But if a $SiteGroup.SideBar does not exist, Site.SideBar will be
included, regardless if a Group.SideBar exists.
Best,
~Hans
More information about the pmwiki-users
mailing list