Startpage >> PmWiki >> GroupHeaders

Group Headers

PmWiki.GroupHeaders History

Hide minor edits - Show changes to output

August 31, 2011, at 11:45 AM by Blahma -
Changed lines 1-48 from:
I really appreciate free, scuicnct, reliable data like this.
to:
(:Summary: Group Header and Group Footer page usage:)
(:Audience: authors (intermediate) :)
Every [[WikiGroup]] can have `GroupHeader and `GroupFooter pages that contain markup that should be included at the beginning or end of each page within the group. This feature is useful for:

* adding a disclaimer or heading to all of the pages of a group
* defining custom [[WikiStyles]] that may be used for all pages in a group
* replacing the default headers and/or footers for pages in a group (e.g., using [@(:noheader:)@] and or [@(:nofooter:)@] -- see [[PageDirectives]]).

To create a group header, just create a new page called [@YourGroup.GroupHeader@]. Group headers allow authors to create groups with custom headers and footers without having to coordinate with a [[wiki administrator]].

The default `GroupHeader or `GroupFooter can be suppressed on an individual page (such as a group's `HomePage) by using the [@(:nogroupheader:)@] and [@(:nogroupfooter:)@] markups ''on that page''.

If a generic `GroupHeader is used in one wikigroup (say, the Site wikigroup), then the code can be easily duplicated in the `GroupHeader of any other group by using
[@(:include Site.GroupHeader:)@]. See [[IncludeOtherPages]].

If you want a header or footer to appear when you print a page (action '''print'''), simply create a page called [@YourGroup.GroupPrintHeader@] or [@YourGroup.GroupPrintFooter@] and fill it with your markup.

You can also set the variable [[LayoutVariables#GroupPrintHeaderFmt | [@$GroupPrintHeaderFmt@]]] and [[LayoutVariables#GroupPrintFooterFmt | [@$GroupPrintFooterFmt@]]] in the same way as [@$GroupHeaderFmt@] and [@GroupFooterFmt@] in order to change the header used when [@action=print@].

See also
* [[Cookbook:All group header]] [- {Cookbook/AllGroupHeader$:Summary} -]
* [[Cookbook:Wiki footer]] [- {Cookbook/Wikifooter$:Summary} -]


>>faq<< [[#faq]]

Q: How do I set one header for all pages/groups?
A: The header for each page is controlled by the $GroupHeaderFmt variable. Thus a site-wide groupheader can be added with

->[@
$GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader
basepage={*$FullName}:)(:nl:)' . $GroupHeaderFmt;
@]
(:comment above line split as it breaks fixed width skins:)

Note that single quotes must be used so that [@$Group@] (which is part of the default contents of $GroupHeaderFmt) will be substituted properly by PmWiki, and that this applies to all variables ending in $[@...Fmt@].
(:comment above note edited as it was breaking fixed width skins:)
See also the Cookbook:AllGroupHeader page.

A: Any form of markup is valid in $GroupHeaderFmt, thus one can do

->[@$GroupHeaderFmt .= "Global markup text here.";@]

Q: Would this then work for site footers?
->[@
$GroupFooterFmt = '(:include {$SiteGroup}.SiteFooter
basepage={*$FullName}:)(:nl:)' . $GroupFooterFmt;
@]
July 08, 2011, at 01:52 AM by Caro - AFtcjeKOVatmhnJm
Changed line 1 from:
v6d4QK , [url=http://gpghwrrshbjm.com/]gpghwrrshbjm[/url], [link=http://tjndtgrfkqun.com/]tjndtgrfkqun[/link], http://nsivaoypmsch.com/
to:
I really appreciate free, scuicnct, reliable data like this.
July 07, 2011, at 03:18 PM by rgvvisb - ryBLNqrlrgdCjCNOQLA
Changed line 1 from:
F9UiWO <a href="http://oprrkutxmueh.com/">oprrkutxmueh</a>
to:
v6d4QK , [url=http://gpghwrrshbjm.com/]gpghwrrshbjm[/url], [link=http://tjndtgrfkqun.com/]tjndtgrfkqun[/link], http://nsivaoypmsch.com/
July 06, 2011, at 01:39 PM by ptpuewupr - vyGKyodbpGhA
Changed line 1 from:
Supeiorr thinking demonstrated above. Thanks!
to:
F9UiWO <a href="http://oprrkutxmueh.com/">oprrkutxmueh</a>
July 06, 2011, at 10:52 AM by Pink - cZTnmwAOkr
Changed lines 1-48 from:
(:Summary: Group Header and Group Footer page usage:)
(:Audience: authors (intermediate) :)
Every [[WikiGroup]] can have `GroupHeader and `GroupFooter pages that contain markup that should be included at the beginning or end of each page within the group. This feature is useful for:

* adding a disclaimer or heading to all of the pages of a group
* defining custom [[WikiStyles]] that may be used for all pages in a group
* replacing the default headers and/or footers for pages in a group (e.g., using [@(:noheader:)@] and or [@(:nofooter:)@] -- see [[PageDirectives]]).

To create a group header, just create a new page called [@YourGroup.GroupHeader@]. Group headers allow authors to create groups with custom headers and footers without having to coordinate with a [[wiki administrator]].

The default `GroupHeader or `GroupFooter can be suppressed on an individual page (such as a group's `HomePage) by using the [@(:nogroupheader:)@] and [@(:nogroupfooter:)@] markups ''on that page''.

If a generic `GroupHeader is used in one wikigroup (say, the Site wikigroup), then the code can be easily duplicated in the `GroupHeader of any other group by using
[@(:include Site.GroupHeader:)@]. See [[IncludeOtherPages]].

If you want a header or footer to appear when you print a page (action '''print'''), simply create a page called [@YourGroup.GroupPrintHeader@] or [@YourGroup.GroupPrintFooter@] and fill it with your markup.

You can also set the variable [[LayoutVariables#GroupPrintHeaderFmt | [@$GroupPrintHeaderFmt@]]] and [[LayoutVariables#GroupPrintFooterFmt | [@$GroupPrintFooterFmt@]]] in the same way as [@$GroupHeaderFmt@] and [@GroupFooterFmt@] in order to change the header used when [@action=print@].

See also
* [[Cookbook:All group header]] [- {Cookbook/AllGroupHeader$:Summary} -]
* [[Cookbook:Wiki footer]] [- {Cookbook/Wikifooter$:Summary} -]


>>faq<< [[#faq]]

Q: How do I set one header for all pages/groups?
A: The header for each page is controlled by the $GroupHeaderFmt variable. Thus a site-wide groupheader can be added with

->[@
$GroupHeaderFmt = '(:include {$SiteGroup}.SiteHeader
basepage={*$FullName}:)(:nl:)' . $GroupHeaderFmt;
@]
(:comment above line split as it breaks fixed width skins:)

Note that single quotes must be used so that [@$Group@] (which is part of the default contents of $GroupHeaderFmt) will be substituted properly by PmWiki, and that this applies to all variables ending in $[@...Fmt@].
(:comment above note edited as it was breaking fixed width skins:)
See also the Cookbook:AllGroupHeader page.

A: Any form of markup is valid in $GroupHeaderFmt, thus one can do

->[@$GroupHeaderFmt .= "Global markup text here.";@]

Q: Would this then work for site footers?
->[@
$GroupFooterFmt = '(:include {$SiteGroup}.SiteFooter
basepage={*$FullName}:)(:nl:)' . $GroupFooterFmt;
@]
to:
Supeiorr thinking demonstrated above. Thanks!
Lasta ŝanĝo August 31, 2011, at 11:45 AM