Dominion Atlantic Railway Digital Preservation Initiative - Wiki
Use of this site is subject to our Terms & Conditions.
Difference between revisions of "Template:File title/doc"
(Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This template can be used to create proper file titles, both if the name space ...") |
(No difference)
|
Latest revision as of 03:48, 9 February 2012
{{#if: |
{{#if:x||
}} |{{#ifeq: doc | doc
|
{{
#ifeq: show | show | {{ {{#switch: {{#if: | | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|template talk | talk | template }} }} }}
| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox
}}
| type = notice
| image = none
| imageright =
| class =
| style =
| textstyle =
| text = This is a documentation subpage for Template:File title (see that page for the {{ #if: Template | template | article }} itself).
It contains usage information, categories and other content that is not part of the original {{ #if: Template |template page|article}}.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
}}
}}{{ #if: | | [[Category:{{ #if: Template | Template | Article }} documentation]] }}
| }} }} This template can be used to create proper file titles, both if the name space was omitted or supplied by the user.
It is primarily of use in templates and should not be used in articles directly.
This template can be substituted.
Usage
- "{{File title| Example.svg }}" → "
{{
safesubst:#if: Example.svg
| {{
safesubst:#ifeq: | File
| Example.svg
| File:{{safesubst:#if:X| Example.svg }}
}}
|
}}
"
- "{{File title| File:Example.svg }}" → "
{{
safesubst:#if: File:Example.svg
| {{
safesubst:#ifeq: File | File
| File:Example.svg
| File:{{safesubst:#if:X| File:Example.svg }}
}}
|
}}
"
- "{{File title| :File:Example.svg }}" → "
{{
safesubst:#if: :File:Example.svg
| {{
safesubst:#ifeq: File | File
| File:Example.svg
| File:{{safesubst:#if:X| :File:Example.svg }}
}}
|
}}
"
To Do
This template could be expanded to a series of "Namespace title" templates, if needed (hopefully sharing the same code).
See also
- {{Category title}}
- {{Transclude}}
- {{Image}}
- {{Linked}}