Template

CatInclude/doc

From Joomla! Documentation

< Template:CatInclude
Revision as of 10:58, 2 December 2012 by Tom Hutchison (talk | contribs) (documentation of template added)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This is a documentation subpage for Template:CatInclude.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:CatInclude.

The template makes category inclusion in other templates easier. It eliminates the need for complicated #switches and #ifeq of NAMESPACE to allow category inclusion in templates without including those categories in certain NAMESPACES such as, the Template and JDOC NAMESPACES.

Functions/Features[edit]

Automatic category inclusion in templates.

Stop hand nuvola.svg.png
Warning!

It is possible to use this template directly in articles. Until this warning is removed, it is not recommended.


Usage[edit]

Must use the parameter {{{1|}}}

  • A simple call would be to add {{CatInclude|Development,Tutorial,Plugin}} to pages which use a template to add content to a wiki page.
  • A complex template call against a parameter in a template can be used inside a #if, #ifeq or #switch call.
Example
{{#ifeq:{{{foo|}}}|tutorial|{{CatInclude|Development,Tutorial,Plugin}}|[[Category:Foo]]}}
OR
{{#ifeq:{{{foo|}}}|tutorial|{{CatInclude|Development,Tutorial,Plugin}}|{{CatInclude|Development}}}}

Parameters[edit]

Parameter Parameter description req./opt.
{{{1}}} categories (in array format, comma separated)
For Example: Development,Tutorial,Plugin
required

Known Issues[edit]

None known, please report on this Template's talk page.