ਫਰਮਾ:Template other

ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਅਜ਼ਾਦ ਗਿਆਨਕੋਸ਼ ਤੋਂ
Jump to navigation Jump to search


Template documentation[view] [edit] [history] [purge]

This is the {{template other}} meta-template.

It helps other templates detect what type of page they are on.

Basic usage[ਸੋਧੋ]

This template usually takes two parameters, like this:

{{template other | Template page text | Other pages text }}

If the template is on a template page, it will return this:

Other pages text

If the template is on any other page, it will return this:

Other pages text

A typical usage case could be to make it so that a template only adds a category when not on a template page. Thus not adding the template itself and other templates that are built with it to the category. Like this:

{{template other | | [[Category:Some maintenance category]] }}

Note that in the example above the "template" parameter was left empty.

Advanced usage[ਸੋਧੋ]

This template works like {{main talk other}}, see full documentation there. Note that it detects "Template talk:" pages as type other. The test parameter demospace for this template understands the values template and other.

See also[ਸੋਧੋ]

Easy to use namespace-detection templates:

More complex namespace-detection templates:

Pagename-handling and detection templates:

  • {{basepage subpage}} – For detecting if on a basepage, subpage or subsubpage.
  • {{pgn}} – Can take apart and put together pagenames in several ways.
  • {{if pagename}} – For pattern matching on the pagename.
  • {{if pagename multi}} – For pattern matching on the pagename, has input reuse.
  • {{IP-user other}} – For detecting IP-user pages.

Technical stuff: