GroupTitles

Summary: Create group titles for groups, analagous to page titles with the (:title:) directive
Version: 2008-5-21
Prerequisites: PmWiki version 2.2
Status: stable
Maintainer: Henrik Bechmann
Categories: Markup
Discussion: GroupTitles-Talk?

Questions answered by this recipe

How do I make a group title, the way I can make a page title?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

Creates page variables $GroupTitle and $GroupTitlespace, and page link markup to read group titles

Notes

Copy the php file to the cookbook directory, and add

include_once('cookbook/grouptitles.php');

to your config.php file.

Administrators add Group Titles to a Site.GroupTitles page as Page Text Variables, in the format

GroupName:Group Title

(...or any other Page Text Variable format). So if the group "ParkCenter" wanted to be shown to the user as "Center of the Park", the administrator would make an entry

ParkCenter:Center of the Park

on a separate line on the Site.GroupTitles page. (The page containing the group titles page text variables can be specified by assigning a page name to $GroupTitlesPageFmt).

Subsequently the Group Title is available in the Page Variables $GroupTitle and $GroupTitlespaced, and the Group Titles can be put into page links with

[[GroupName.{$DefaultName}|!+]]

In the example

[[ParkCenter.ParkCenter|!+]] would show up as a link with the text "Center of the Park".

This markup is particularly useful in Page List Templates.

So page titles and group titles now have exact analogues:

  • Page titles have $Title and $Titlespaced page variables,
    and the markup [[target|+]],
    set by (:title:)
  • Group titles have $GroupTitle and $GroupTitlespaced page variables,
    and the markup [[target|!+]],
    set by page text variable entries in Site.GroupTitles

Release Notes

2008-5-17
First release, beta
2008-5-21
Stable release

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See Also

GroupTitle by Pm

Contributors

Comments

See discussion at GroupTitles-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.