[pmwiki-users] Re: (:include:) like <!--wiki:put_your_pagenames_here-->

Bronwyn Boltwood arndis at gmail.com
Fri Aug 19 14:06:49 CDT 2005

On 8/18/05, Hans <design at flutesong.fsnet.co.uk> wrote:
> To get a similar effect as <!--wiki:Group.Page1 Group.Page2-->
> where Page2 is only loaded if Page1 does not exist you can use
> conditional markup (:if exist fullpagename:)

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:)

The intent being:
1. Include the group's special sidebar if it exists, and then stop.
2. Otherwise, include sitewide sidebar from $SiteGroup, and then stop.
3. If $SiteGroup.SideBar doesn't exist either, then include Site.Sidebar.

This had...interesting...results.  On pages in Site, Site.SideBar was
included three times.  In PmWikiAdmin, which has a custom sidebar, the
custom sidebar was included, but then there were also two copies of
Site.SideBar.  Even more interestingly, when on any SideBar page, the
includes stopped working altogether!

Changing the first line to 

(:if group {$Group}:)(:include {$Group}.SideBar:)

didn't work any better.

I must have written something wrong...  For now, I go back to
SideBarTop and Bottom.


More information about the pmwiki-users mailing list