Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.mrao.cam.ac.uk/projects/OAS/pmwiki/pmwiki.php/PmWiki/GroupHeaders?action=print
Дата изменения: Unknown
Дата индексирования: Sat Mar 1 21:37:41 2014
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п р п р п р п р п р п р п р п р п р п р п р п р п р п
OptInt PmWiki : PmWiki / Group Headers
OptInt PmWiki : Pm Wiki / Group Headers

< Wiki groups | Documentation Index | Wiki trails >

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:

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 $GroupPrintHeaderFmt and $GroupPrintFooterFmt in the same way as $GroupHeaderFmt and GroupFooterFmt in order to change the header used when action=print.

See also

How do I set one header for all pages/groups?

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;

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. See also the Cookbook:AllGroupHeader page.

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

$GroupHeaderFmt .= "Global markup text here.";

Would this then work for site footers?

$GroupFooterFmt = '(:include {$SiteGroup}.SiteFooter
                   basepage={*$FullName}:)(:nl:)' . $GroupFooterFmt;

< Wiki groups | Documentation Index | Wiki trails >


This page may have a more recent version on pmwiki.org: PmWiki:GroupHeaders, and a talk page: PmWiki:GroupHeaders-Talk.

(Printable View of http://www.mrao.cam.ac.uk/projects/OAS/pmwiki/pmwiki.php/PmWiki/GroupHeaders)