Template:Image other/doc

From LizardWiki, FastLizard4's wiki and website
Jump to: navigation, search


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

This template helps other templates detect if they are on a "File:" page or some "other" type of page.

This template was previously named {{image other}}. That name redirects here so it still works, but using the old name is now deprecated.

Usage

This template usually takes two parameters, like this:

{{file other | File page text | Other pages text }}

If the template is on a file (image) page, it will return this:

Template:File other

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

Template:File other

A typical usage case could be to make it so that a template only adds a category when on file pages. Thus not adding other pages that just show the template. Like this:

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

Or to warn that a template should not be used on other pages:

{{file other | | This template should only be used on file (image) pages. }}

Note that in the first case above the "other" parameter was not used, and in the second example the "file" parameter was left empty.

Attribution

This template was originally created on Wikipedia and is a derivative of Template:File other