Extension:ConditionalTemplate

Purpose
The purpose of this extension is to enable conditional execution of a template.

The extension is especially useful if one relies on a complex 'stack' of templates to render a page and would rather make this as generic as possible. The conditional inclusion of a specified page enables, for example, definition of one master template which includes various 'header' / 'footer' pages depending on the namespace of inclusion.

Example
The above example will transclude the page 'HeaderPageNameForCategoryNamespace' if the call is made from a page residing in the  namespace.

Dynamic Pages
This extension can be used in conjunction with Extension:ParserPhase2 to allow for more dynamic pages. (($#template: page | condition $))