GroupTitle

Summary: Define a title for an entire WikiGroup
Version: 2006-11-14
Prerequisites: pmwiki-2.1
Status: Stable
Maintainer: Pm
Categories:PageNaming
Discussion: GroupTitle-Talk

Questions answered by this recipe

  • How can I define a title for an entire wikigroup?

Description

This recipe adds {$GroupTitle} and {$GroupTitlespaced} page variables. The group title is taken as the first title (for instance (:title My Group Title:)) found in GroupAttributes, GroupHeader, GroupFooter, Group.Group (i.e. $Group.$Group), or Group.HomePage (i.e. $Group.$DefaultName). If none of these pages have titles, then the name of the group is used (spaced according to $GroupTitlespaced or $SpaceWikiWords).

Notes

Download grouptitle.phpΔ into the cookbook/ directory, and then add the following to a local customization file:

    include_once("$FarmD/cookbook/grouptitle.php");

The $GroupTitlePathFmt variable can be modified to search a different set of pages for a group title.

    # use only GroupAttributes for a group title
    $GroupTitlePathFmt = '$Group.GroupAttributes';
    # use only GroupHeader and GroupFooter for a group title
    $GroupTitlePathFmt = array('$Group.GroupHeader', '$Group.GroupFooter');

To display the GroupTitle instead of the usual Group name in a page's titlebar, you will most likely need to modify the skin's template file, so that the name in the normal link at the page head for the Group is replaced by $GroupTitle or $GroupTitlespaced. I.e. in the skin tmpl file change $Group or $Groupspaced to $GroupTitle or $GroupTitlespaced, but only for the name of the group between the <a ...> </a> tags of the link to the group (in the titlebar or header section). Do NOT replace EVERY occurrence of $Group or $Groupspaced with $GroupTitle or $GroupTitlespaced. If you cannot understand the code, seek online help or contact the skin author.

Some skins have built-in support for GroupTitle, and will show it when it is defined with a (:title ...:) directive as outlined above. But you would still need to install this recipe script.

Skins with built-in GroupTitle support: Gemini skin?, FixFlow skin?, Triad skin?, ....

See Also

Contributors

Comments

See discussion and sandbox at GroupTitle-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.