[pmwiki-users] Skin File Search Order
Kathryn Andersen
kat_lists at katspace.homelinux.org
Wed Jun 24 17:35:42 CDT 2009
On Tue, Jun 23, 2009 at 12:41:51PM -0400, DaveG wrote:
> 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.
If the others get ignored, and the skin version always overrides, then I
would find that really annoying, as a user.
> 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'.
Why? I don't understand why it would fail. I assume that you're
providing your own version of {$Site}.{$SkinName}-SiteFooter, yes?
> 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.
Another option could be like what I do with the Bonny skin's MenuBar;
provide the option of enabling/disabling it, by
1) having a global variable that they can set, something like
(SkinName)EnableMenuBar
2) Providing a version of Site.MenuBar which has a (:if:) test which
checks the value of that variable, and only displays that content if
that variable is true.
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