Documentation

  1. Download the latest package from http://technology.pillwax.com/header-footer.
  2. Install the Plugin (Mambot) in your Joomla installation.
  3. Publish the Plugin (Mambot), maybe put him into a higher priority than other Plugins (Mambot).
  4. Set the Header-Footer parameters accordingly to your requirements (see also below).
  5. Done.

Here the relations are being set to assign Header and/or Footer content items to Sections, Categories, Content Items or Authors. The language describing rules used here is defined as followed:

Example: Assigning Content Item with ID 39 to Section with ID 1 & 2

s[1,2]=39

Example: Assigning Content Item with ID 45 & 46 to Content Items with ID 6 & 7

cid[6,7]=45,46

Example: Assigning Content Item with ID 19 to all Authors

a[*]=19


The convention for defining rules for Headers or Footers is flexible by using this notation:

Convention for definition of Headers or Footers

s|c|a|cid[*|#,#,#,...]=#
s|c|a|cid[*|#,#,#,...]=#,#,...


These are the abbreviations and their meaning used to described the Context relation:

s   ... Section with ID (or multiple ID's separated by comma) in square brackets.
c   ... Category with ID (or multiple ID's separated by comma) in square brackets.
a   ... Author with ID (or multiple ID's separated by comma) in square brackets.
cid ... Content Item with ID (or multiple ID's separated by comma) in square brackets.
i   ... Menu Item ID of the current selected menu item.
pi  ... Parent Menu Item ID of the current selected menu item, if the current menu item is linked to a parent menu item.


To assign a Content to any of the Sections, Categories, and such use a asterisk (*) instead of ID's in the square brackets.

Single and multiple Content items are allowed to get used as Headers or Footers:

=#        ... assigns a single content item with the given ID
=#,#,#,.. ... assigns multiple content items with the given ID's in order of left to right


  • Multiple ID's are always to be separated by commas.
  • The order of the assignement rules are from top to bottom and left to right


Combining Rules

Individual Rules are allowed to get AND combined by using & as combining symbol:

Example: Combining Sections with Authors, such that only Header or Footer are used when navigation is in that particular section

s[1,2]&a[5,6,7]=19

This will include Content ID 19 only when the current Section is 1 or 2 and the Content Author ID is 5,6 or 7.

Example: Combining Sections with Authors, only Header or Footer are used when navigation is in that particular section for all Authors

s[1,2]&a[*]=19

Same as the previous exmaple, instead of limiting to single Author ID's all Authors are selected by using the Asterisk * operator.


Showing Headers and Footers only on View, Print or both

(Commercial Unlimited License only, requires Version 1.03 or higher)

Rules also allow options controlling under which View of the site a Header or Footer shall get used:

s[1,2]=29(print)

This will insert the Content ID 29 when the current Section is 1 or 2 only in the Print window or view of the site.

By using following options to a single Header or Footer rule, these allow to control where the respective content will apear on. When omitting this options, the content will get used in all Views (Site and Print).

(view)  ... Only show on the Site View
(print) ... Only show on the Print View
(pdf)   ... Only show on the PDF View



When wanting to use Header-Footer in the PDF View of the Article, this requires modification of a Joomla! Core File, unfortunately as the PDF render class does not invoke all published plugins:

Joomla 1.5: components/com_content/view/article/view.pdf.php

/*
* Joomla 1.5
* File: components/com_content/view/article/view.pdf.php
*
* Modification to invoke Header-Footer Plugin for PDF also
*/
class ContentViewArticle extends JView
{
	function display($tpl = null)
	{
 
	  ...
 
	  // process the new plugins
	  JPluginHelper::importPlugin('content', 'image');
 
	  // --- Modification to load the Header-Footer Plugin ---
	  JPluginHelper::importPlugin('content', 'headerfooter_ce');
 
	  $dispatcher->trigger('onPrepareContent', array (& $article, & $params, 0));
 
	  $document = &JFactory::getDocument();
 
	  ...





Showing Headers and Footers when a Content is set as archived

(Commercial Unlimited License only, requires Version 1.04 or higher)

This rule option allows to show a Content Item as Header or Footer whenever a Article is in archived state:

s[1,2]=29(archived)

This will insert the Content ID 29 when the current Section is 1 or 2, and the current shown Article is in archived state.

By using following option to a single Header or Footer rule, these allow to control the behaviour with archived content:

(archived)  ... Show only when the current content item displayed is in 'archived' state.



(Commercial Unlimited License only, requires Version 1.04 or higher)

Language Rules allow to show a particular Header or Footer also if:

  • The current shown language is as per the language rule and the current content is available as translation to the current language.
  • The current shown language is as per the language rule and there is no translation to the current language available.


For this language related rules, JoomFish is required to be installed on your Joomla! site.


s[1,2]=29(en-gb)

This will insert the Content ID 29 when the current Section is 1 or 2, and the current language is en-gb (English) and there is a translation of the current content item in this language available.

s[1,2]=29(!de-de)

This will insert the Content ID 29 when the current Section is 1 or 2, and the current language is de-de (German) and there is NO translation of the current content item in this language available. For example this is usefull to display a Header or Footer to a content item explaining that this current article is only available in this particular language, while still displaying the content in the original language.

By using following options to a single Header or Footer rule, these allow to control the behaviour with languages:

(<language code>)  ... Show when current language is <language code> and the current content is available in that language.
(!<language code)  ... Show when current language is <language code> and there is no translation of the content in that language.



Insert Headers and Footers

This allows to select where Headers or Footers shall get inserted. It may be desired to display Headers or Footers for example only when the Content is shown, however not on the Frontpage. Here the following settings allow to control the insertion behaviour:

On Frontpage and on Content Page

Inserts any Headers or Footers in all views, Frontpage as well as on a single Content Page

On Frontpage only

Inserts any Headers or Footers only on the Frontpage view.

On Content Page only

Inserts any Headers or Footers only when a Content Page is viewed.


Run Plugins

With this settings, the way of executing the Joomla Plugins (Mambots) on the inserted content of Headers or Footers is able to be controlled:

No, insert Content as is

The Content Item inserted as Header or Footer is being inserted as is. If there is the need that other Plugins (Mambots) process also the inserted content of Headers or Footers, than the Header-Footer plugin has to be in high order of the plugins. By ordering the Header-Footer plugin high in the list of plugins, the Headers and Footers get inserted before other plugins receive the content such that other plugins are able to also process the content of the Headers/Footers itself.

Yes, run Plugins on inserted Content also

Other Plugins (Mambots) are being executed on the Content Item that will get inserted as Header or Footer prior to its insertion into the current content.

Ensure that there are no stacked Headers or Footers. By stacked it is meant that there may be another Header or Footer assigned to the Content Item that is already used as Header or Footer. That may create a server resource exhaustion.

Debug Mode

This settings allows to enable the Plugin's Debug Mode, showing errors that might be caused by this plugin in your Joomla environment.

When set to On the extension will display Debug Information on your site about the current Context ID's of the individual Articles. Use this to see if:

  • The extension is actually invoked by Joomla! on your site
  • What ID's a specific Article is having to help during setting of your rulesets