[pmwiki-users] Skin File Search Order

DaveG pmwiki at solidgone.com
Fri Jun 26 09:06:11 CDT 2009



Hans wrote:
> Dave, I am having dificulty understanding your approach.
> Why would a skin want its own SideBar subpage for instance?
> To me a skin determines the layout and appearance, but not
> content. Layout is determined by the skin template, and apearance
> chiefly by css.
> 
> Exceptions may be that a skin may also provide some functional
> additions, like a search form in the sidebar, action buttons at other
> places etc. The skin template and php file can take care that
> such is added without the user having to edit standard PmWiki
> subpages like SideBar.
> 
> So what does a  {$Site}.{$SkinName}-SideBar achieve which cannot
> be done by template and css file?
Whilst it would be nice to separate layout elements from content, we're 
not even close to that point. Practically every skin I've ported has 
required additional html elements in order to achieve particular visual 
effect. Some examples:
* Blix: In order to achieve the rounded corner effect on sidebar 
headers, an additional html element is added. (In this case though I 
chose to add the html dynamically via javascript)
* Header/footers: Typically changes are needed here to accommodate 
subsections within the header and footer.
* Footer: Usually a left/middle/right subdivision. Some skins have an 
'About' section in the footer, or use the footer for more content than 
we typically see in PmWiki (GlossyHue is an example).
* Header: The addition of a header tag line. In Skidoo the addition of a 
history of links.
* Sidebar: In Skidoo I added tabs to the sidebar, which required 
additional html.

Those are some examples. To think that we can accommodate the layout 
needs of user with no changes to existing markup is probably not realistic.

I will note though that going back through the skins, the problem isn't 
as prevalent as I had thought. In most cases the header is the same, and 
it's the footer or sidebar that change, and I've pretty much 
standardized on:
! %block sitetitle%[[{$ScriptUrl} | {$WikiTitle}]]
%block tagline%{$WikiTagline}

So whilst the problem is less than I had thought, and I could probably 
remove it on some skins, it still exists. Perhaps though we take the 
approach of saying where it exists, it's part of the setup of the skin 
to manually have the user change the header/footer/sidebar formatting -- 
which they will basically have to do anyway,=.

Another approach I thought of that might work in many cases is to 
consider the changed header/footers/sidebar as an entirely new page. So 
rather than using a list of pages, simply eliminate Site.Sidebar from 
the list -- just use the new page.

  ~ ~ David



More information about the pmwiki-users mailing list