[pmwiki-users] Skin File Search Order
DaveG
pmwiki at solidgone.com
Tue Jun 23 11:41:51 CDT 2009
I've now gone around in circles on my thinking, so I'd like to get some
input from the wider community.
Many skins require a specific layout for header/footer/sidebar
(additional HTML or other markup) in order to achieve particular
effects. In order to help users along I've typically created skin
specific files. The idea being that the skin works out-of-the-box,
doesn't automatically pick up template files formatted for other skins,
but allows the user to change things if desired. Also, having minimal
impact when the user switches skins.
1] Thus, I've been using this search order:
{$Site}.{$SkinName}-SiteFooter {$Group}.SiteFooter {$Site}.SiteFooter
I include a Site.{$SkinName}-SiteFooter within the skins wikilib.d.
The problem with that approach is that the other files in the list
basically get ignored; the only way for the user to not use
Site.{$SkinName}-SiteFooter is to physically delete it from the skin
wikilib.d. However, it does minimize the impact when the user switches
to a new skin.
2] An alternate is to put {$Site}.{$SkinName}-SiteFooter at the end of
the search order, but then we may end up with the skin not working
'out-of-the-box'.
3] The final option, is to omit the {$Site}.{$SkinName}-SiteFooter
altogether, and simply put formatting instructions on the skins wiki
page. That does mean that there may be work for the user, specifically
that they will have to change a site file in such a way that it may be
incompatible with other skins. Again, not desirable, although the effect
can be reduced by simply using an (:if false:) to comment the original
content.
I'm tending towards sticking with the first option, but I'd like to get
some input.
~ ~ Dave
More information about the pmwiki-users
mailing list