r8 - 14 Jun 2006 - 10:51:10 - ClifKussmaulYou are here: TWiki >  TWiki Web > CommonHeaderFooterPlugin

Common Header Footer Plugin

This plugin inserts a common header and/or footer into every topic, without requiring special tags in each topic.

Syntax Rules

In general, this plugin does not require special syntax, since it is intended to insert a common header or footer without special syntax in each topic. Preference variables (described below) specify which topics to use for the common header and footer, and which topics or webs should be allowed or denied such headers and footers.

NOTE: To prevent infinite recursion, this plugin will not include the common header or footer in the header or footer topics.

In other topics where you explicitly want a header or footer, you can use:

  • %COMMONHEADER% to include the common header.
  • %COMMONFOOTER% to include the common footer.

In topics where you explictly do not want a header or footer, you can use:

  • %COMMONHEADERSKIP% to skip the common header.
  • %COMMONFOOTERSKIP% to skip the common footer.

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %EMPTYPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Plugin to insert a common header and/or footer into every topic.

  • Topic containing common header (if web is not specified, plugin looks in same web as parent topic).
    • Set HEADERTOPIC = CommonHeader?

  • Topic containing common footer (if web is not specified, plugin looks in same web as parent topic).
    • Set FOOTERTOPIC = CommonFooter?

  • Comma-separated list of topics that should have common header
    • Set ALLOWHEADERTOPIC =

  • Comma-separated list of topics that should have common footer
    • Set ALLOWFOOTERTOPIC =

  • Comma-separated list of webs that should have common header
    • Set ALLOWHEADERWEB = Sandbox

  • Comma-separated list of webs that should have common footer
    • Set ALLOWFOOTERWEB = Sandbox

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 3

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip CommonHeaderFooterPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/CommonHeaderFooterPlugin.txt Plugin topic
    data/TWiki/CommonHeaderFooterPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/CommonHeaderFooterPlugin.pm Plugin Perl module
  • Test if the installation was successful: see above at #Example

Plugin Info

Plugin Author: TWiki:Main.ClifKussmaul
Copyright: © 2006, TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 11 Jun 2006
Change History:  
11 Jun 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle ??%, FormattedSearch ??%, CommonHeaderFooterPlugin ??%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/CommonHeaderFooterPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/CommonHeaderFooterPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/CommonHeaderFooterPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- TWikiContributor - 01 Feb 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r8 < r7 < r6 < r5 < r4 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.CommonHeaderFooterPlugin