GroupTitles
Questions answered by this recipe
How do I make a group title, the way I can make a page title?
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
(...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
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
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.