[Pmwiki-users] Re: Skins - a somewhat radical proposal

John Rankin john.rankin
Sun Nov 14 17:25:48 CST 2004


On Monday, 15 November 2004 11:29 AM, Knut Alboldt <pmwiki at alboldt.de> wrote:

>but: just a simple question: if a skin is set per group, how could be 
>avoided that a group names "print" or "publish" will be displayed with the 
>templates meant for the action named "print" / "publish" ? How
>to distinguish ?

I think it might work like this:

By default, $ActionSkins['print'] = 'print';

If you have a group called Print, and don't want this to use the print skin,
rename pub/skins/print/ to (for example) pub/skins/printable/ and set

    $ActionSkins['print'] = 'printable';

And if you want a separate skin for the Print group, you put it in
pub/skins/Print/
>
>and how could I change to another template within a skin (= ActionSkin[] 
>according to the Action, what's about Groups / pagenames ?)

I think PmWiki would evaluate in the following order:

    $DefaultSkin, $Skin, $Group, $FullName, $action

which gives a lot of flexibility while still being fairly easy to explain.

So suppose

    $DefaultSkin = 'pmwiki';
    $Skin = 'banana';
    $Group = 'Recipes';
    $FullName = 'Recipes.BananaPancakes';

There might be a skin used for just one page or a pub/skins/Recipes skin.
And local/Recipes.php might set 

    $ActionSkins['publish'] = 'recipebook';

so a publish action in the Recipes group uses the recipebook skin.



-- 
JR
--
John Rankin





More information about the pmwiki-users mailing list