[Pmwiki-users] Sharing GroupHeader among groups

Patrick R. Michaud pmichaud
Thu Dec 9 08:54:15 CST 2004

On Thu, Dec 09, 2004 at 04:02:58PM +0000, jmp at mrjmp.plus.com wrote:
> Is there a way of sharing a GroupHeader page among several groups?
> I have three closely related wiki groups with the same set of contributers.
> Several of whom have defined custom styles to identify their contributions 
> (eg. %define=james color=green%). I'd like to share these among the 
> groups but at the same time leave them user-editable so that we can/add 
> change them. At the moment we have to change the GroupHeader in each of 
> the groups. 
> Is there a customizartion variable that can point to a different page for
> GroupHeader or similar?

Assuming your groups are GroupA, GroupB, and GroupC:

1.  You could put your styles in GroupA.GroupHeader, and then place
        (:include GroupA.GroupHeader:)
    inside of GroupB.GroupHeader and GroupC.GroupHeader.  Then you would
    only need to edit GroupA's groupheader.  

    Of course, the included file doesn't even have to be called 
    "GroupHeader" -- you could easily do
        (:include Main.AuthorStyles:)
    in each of the GroupHeaders and have people just edit the 
    Main.AuthorStyles page.

2.  You can programmatically do this in the configuration by changing the 
    value of $GroupHeaderFmt to:

        $GroupHeaderFmt = '(:include Main.AuthorStyles:)(:nl:)(:include $Group.GroupHeader:)(:nl:)';

    This would cause every page to get both Main.AuthorStyles and 
    {$Group}.GroupHeader at the beginning.  The $GroupHeaderFmt variable
    could be set site-wide (in config.php) or in any per-page or per-group
    configuration file.


More information about the pmwiki-users mailing list