[Pmwiki-users] Conditional styling when inserting a page

Patrick R. Michaud pmichaud
Sun Jan 16 11:29:49 CST 2005


On Sun, Jan 16, 2005 at 11:05:03AM +0000, Hans Bracker wrote:
> I can insert a page into a rigt bar through this in the skin template:
>   <!--PageRightFmt-->
>       <div id='rightbar'><!--wiki:$Group.RightBar Main.RightBar--></div>
>   <!--/PageRightFmt-->
> Now i like to add styling only if
> <!--wiki:$Group.RightBar Main.RightBar--> is not empty.
> How do i test this? Is there a variable i can use?

I'm still working on a "good" standard way to do this.  So far the best
I've come up with is to do something like the following in skin.php:

if (PageExists(FmtPageName('$Group.RightBar', $pagename)) ||
    PageExists('Main.RightBar')) { 
  ....
}

Pm



More information about the pmwiki-users mailing list