[pmwiki-users] Hiding the SideBar in templates
Patrick R. Michaud
pmichaud at pobox.com
Wed Jun 29 08:55:21 CDT 2005
On Tue, Jun 28, 2005 at 11:16:26AM +0100, Hans wrote:
> or instead of markup put in config.php:
>
> $sbr = FmtPageName('$Group.SideBar',$pagename);
> if (!PageExists($sbr)) SetTmplDisplay('PageLeftFmt', 0);
I've been thinking about extending the <!--PageLeftFmt--> (and other)
markups to allow "switches" that would indicate if the page should
be loaded or not. For example, something like:
<!--PageLeftFmt PageExists("$Group.SideBar")-->
...
<!--/PageLeftFmt-->
which would define PageLeftFmt, and perform the equivalent SetTmplDisplay
depending on the value of PageExists. Or, rather than full PHP code,
we could limit the test to just the existence/non-existence of pages:
<!--PageLeftFmt $Group.SideBar-->
...
<!--/PageLeftFmt-->
I'm also planning to add (:noright:) to the core.
Pm
More information about the pmwiki-users
mailing list