[pmwiki-users] Re: Note to skin designers
V.Krishn
mistyfire at autograf.pl
Sat Feb 19 14:56:33 CST 2005
This is certainly a desirable feature. :) Thanks.
Would try asap to update notebook/2 skins accordingly.
~V.Krishn
On Saturday 19 February 2005 16:22, pmichaud at pobox.com wrote:
........
>
> The changes I made are designed to make it much easier to enable/disable
> sections of a skin template. For example, a number of sites have asked to
> be able to "turn off" the sidebar when editing a page (to provide more
> editing space), and several skin designers will tell you that this
> has indeed been a pain. With the new setup, a wiki administrator
> (or skin designer) can simply do:
>
> if ($action == 'edit') SetTmplSection('PageLeftFmt', 0);
>
> to cause the PageLeftFmt section (containing the sidebar) to be
> suppressed in the output. Similarly, one can do
>
> if (!PageExists(FmtPageName('$Group.SideBar', $pagename)))
> SetTmplSection('PageLeftFmt', 0);
>
> to display the left sidebar only if the $Group.SideBar page exists.
>
> The new code also allows skin designers to create template sections
> in addition to the ones predefined by PmWiki such as PageLeftFmt,
> PageTitleFmt, etc. For example, a skin designer can now define sections
> such as <!--PageTopMenuFmt--> or <!--PageCommandsFmt--> and have them
> automatically appear in the output and be switchable using the
> SetTmplSection() function above. Previously this was possible
> only by adding the additional desired sections names into the
> $BasicLayoutVars array, which was a bit of a pain.
>
..........
> Pm
More information about the pmwiki-users
mailing list