Actions

Template

Main talk file other

From Joomla! Documentation

Revision as of 12:37, 9 May 2008 by CirTap (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

other

[view] [edit] [history]

Template-info.pngTemplate documentation

Contents

This template is used inside other templates that need to behave differently (usually look differently) depending on what type of page they are on. It detects and groups all the different namespaces used on Joomla! Documentation into four types:

main = Main/article space, as in normal Wikipedia articles.
talk = Any talk space, such as page names that start with "Talk:", ":", "Framework talk:" and so on.
file = Image/media space, such as viewing an uploaded file
other = All other spaces, such as page names that start with "User:", ":", "Framework:" and so on.

Functions/Features

If this template is used without any parameters it returns the type name that the page belongs to: main, talk, file or other.

This template can also take four parameters and then returns one of them depending on which type a page belongs to.

Usage

This template page (and its doc page) belongs to the type "other". Thus this code on this page: {{main talk file other}} renders like this: other

Using the numeric parameter 1 - 4

{{main talk file other|Article text|Talk page text|Image page|Other pages text}}

it renders like this:

Other pages text

Parameters

Parameter Name Parameter Description req./opt.
{{{1}}} - {{{4}}} alternative return value depending on namespace match optional
{{{demospace}}} for documentation of this template using a different namespace optional

See also

For a more specific alternative see {{thingamabob}}


main talk other is based on: Wikipedia:Main talk other (edit|talk|history|links|watch|logs)