[pmwiki-users] Edit Template for a group
Petko Yotov
5ko at free.fr
Sat Mar 10 17:57:10 CST 2007
On Sunday 11 March 2007 00:28, Dr Fred C wrote:
> OK, maybe I just can't read the nose in front of my face. But I can't
> seem to make any sense of how to make Edit Templates do anything but
> provide a site wide template. What I need is a template for a specific
> group called "Roster".
>
> The examples in Edit Template documentation aren't particularly clear as
> to how to make this work. If I put
>
> $EditTemplatesFmt = 'Roster.PlayerTemplate';.
>
> into the local/config file, I get that Player template showing up site
> wide for every new page. This isn't desirable. BTW, having to put
> this sort of stuff in local config seems like a kludge solution to this
> problem.
>
> IMHO, it would seem intuitive to be able to define the Edit Templates
> one wants to use for any particular group in the home page for that
> group. Or perhaps one might have a site.edittemplate page where someone
> might define various group templates with something like
> $EditTemplateFmt.Roster = 'Roster.PlayerTemplate';
Either set this in config.php :
$EditTemplatesFmt = array('$Group.MyTemplate', '$Group.MySecontTemplate',
'Templates.$Group-template');
It will use a page "MyTemplate" in the current group, then "MySecondTemplate",
then in a special group Templates and if none is found, will be a blank page.
Or set this in /local/Rooster.php :
$EditTemplatesFmt = array('Rooster.PlayerTemplate');
This will override all other settings and for the Rooster group it will use
the PlayerTemplate page.
Have fun,
Petko
More information about the pmwiki-users
mailing list