[pmwiki-users] Suppressing Group Name . . .

Hans design at flutesong.fsnet.co.uk
Wed Aug 3 13:46:42 CDT 2005


Wednesday, August 3, 2005, 7:25:37 PM, Ben wrote:
> How would I go about supressing the Group name when at that Group's default
> page? For example, if I'm at Main.HomePage, but I don't want the Group to be
> displayed; whereas I would want it displayed if I were at Main.BubbleGum.

This is very skin dependant. You could change the skin template so it
does not use $Group or $Groupspaced in the page title section, and
replace it with  a variable, which you could define in the skin's
skin.php script.

I did this with Gemini and FixFlow skins, so the display of the group
name could be turned off (site-wide), or turned off with custom markup
(:nogroup:) on individual pages.

This is the code snippet from gemini skin:
The variable $PageGroup replaces in the template $Group or
$Groupspaced.
The variable $EnableGroupTitle is set in the top of skin.php
to some default ($EnableGroupTitle = 1;), as a way to conveniently
switch off the group name sitewide.

# switch to hide group-link in titlebar
global $PageGroup;
$PageGroup = FmtPageName('',$pagename);
if ($EnableGroupTitle == 1) { $PageGroup = FmtPageName('$Groupspaced',$pagename); }
else { $PageGroup = FmtPageName('',$pagename); };

# Markup (:nogroup:) to hide group in titlebar
function NoPageGroup() {
        global $PageGroup;
        $PageGroup = FmtPageName('',$pagename);
        return ''; } 
Markup('nogroup','directives','/\\(:nogroup:\\)/e',
  "NoPageGroup()");



Best, 
~Hans                           





More information about the pmwiki-users mailing list