[pmwiki-users] Skin-specific Wiki Pages

Kathryn Andersen kat_lists at katspace.homelinux.org
Sat Aug 19 17:31:04 CDT 2006

On Sat, Aug 19, 2006 at 12:29:07PM -0700, Andrew Standfield wrote:
> Can someone explain to me how skin-specific wiki pages can be  
> included in a skin? The skin guidelines provide the LightSkin  
> EditForm example, but it's far too specific to get my head around.  
> I'd like a generic explanation... using as small of words as possible :)

Well, in KatSkin I use two approaches to this problem.
The simplest is to use the "<!--wiki: -->" markup in the template file
of the skin (in this case, "katskin.tmpl").

This markup is used in a skin template to include wiki pages, in a
similar way to the (:include :) markup inside wiki pages themselves.


This is the usual way to enable group-specific overrides of included
wiki pages, such as the SideBar, by using variables, for example:

<!--wiki:{$Group}.SideBar {$SiteGroup}.SideBar-->

The above will include the SideBar page of the current group if it
exists, otherwise it will include the SideBar page of the Site group
(which is, by default "Site", but since it can be overridden in
config.php, it is best to use the {$SiteGroup} variable).

In KatSkin I use this approach to override the PageActions wiki page
with my own PageActionsCMS page, as follows:

<div class='wikicmds'><!--wiki:{$Group}.PageActionsCMS {$SiteGroup}.PageActionsCMS {$Group}.PageActions {$SiteGroup}.PageActions--></div>

The second approach I used is probably not what you need, but I'll
mention it here anyway.  With KatSkin, I also have a skin-specific wiki
page called MenuBar.  But I want to be able to make its inclusion
optional, depending on the setting of $KatSkinMenuBar in the user's
configuration.  So, to make the inclusion conditional, I use the
"<!--markup: -->" markup, which is a way of using wiki markup inside the
template file.

So I have the following:

<div id='menubar'><!--markup:(:if enabled KatSkinMenuBar:)(:include {$Group}.MenuBar {$SiteGroup}.MenuBar:)(:ifend:)--></div>

Kathryn Andersen
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe

More information about the pmwiki-users mailing list