|
Cookbook /
AllGroupHeaderSummary: How to create a page that appears as a header (or footer) for all pages in all groups
Version: 1
Status: Stable
Prerequisites: pmwiki-2.0
Maintainer:
Categories: Layout
Votes:
QuestionHow do I create a Site.AllGroupHeader page which can contain styles and content for all pages in all groups? AnswerIf the group contains a wiki page called
$GroupHeaderFmt =
'(:include {$SiteGroup}.AllGroupHeader:)(:nl:)'
.'(:include {$Group}.GroupHeader:)(:nl:)';
The variable Alternatively you can have a site-wide header as a default that can be overridden by a $Group.GroupHeader page. You can set:
$GroupHeaderFmt =
'(:include {$Group}.GroupHeader {$SiteGroup}.SiteHeader:)(:nl:)';
which uses the group's GroupHeader if it exists, otherwise it uses Site.SideHeader. Notes and CommentsHere are equivalent variables for footers:
$GroupFooterFmt =
'(:nl:)(:include {$SiteGroup}.AllGroupFooter:)'
.'(:nl:)(:include {$Group}.GroupFooter:)';
and
$GroupFooterFmt =
'(:nl:)(:include {$Group}.GroupFooter {$SiteGroup}.SiteFooter:)';
See Also
Contributors-- Pm, Christian, Hans QuestionProblem: When adding this script into the webpage the
{$Group}-tag on the header-page has the value of the header-page-group instead of the text-group... (Hard to explain, but I hope you understand....)How do I solve this? //Rufus Use {*$Group} to refer to the group of the text page. -- Pm
User notes +1: 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. |