Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

GroupTitle

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

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, or Group.HomePage. 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('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, ....

Comments

See Also

Contributors

Sandbox

GroupTitle of this group: Cookbook

GroupTitle of a page in the 'Test' group: Test,... one, two, three,... test?

Edit - History - Print - Recent Changes - Search
Page last modified on May 18, 2007, at 11:21 AM