Difference between revisions of "Template:File title"
Jump to navigation
Jump to search
imported>Amalthea m (Protected Template:File title: Highly visible page: about to be used in other protected templates ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
imported>Amalthea (Allow substing. Ugly.) |
||
| Line 1: | Line 1: | ||
{{ | {{ | ||
| − | #if: {{{1|}}} | + | {{{subst|}}}#if: {{{1|}}} |
| {{ | | {{ | ||
| − | #ifeq: {{NAMESPACE:{{{1|}}}}} | {{ns:File}} | + | {{{subst|}}}#ifeq: {{{{{subst|}}}NAMESPACE:{{{1|}}}}} | {{{{{subst|}}}ns:File}} |
| − | | {{FULLPAGENAME:{{{1|}}}}} | + | | {{{{{subst|}}}FULLPAGENAME:{{{1|}}}}} |
| − | | {{ns:File}}:{{ | + | | {{{{{subst|}}}ns:File}}:{{{{{subst|}}}#if:X|{{{1|}}}}} |
}} | }} | ||
| <!-- Empty first parameter --> | | <!-- Empty first parameter --> | ||
Revision as of 13:23, 28 November 2009
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 }}" → "
File:Example.svg" - "{{File title| File:Example.svg }}" → "
File:Example.svg" - "{{File title| :File:Example.svg }}" → "
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}}
- {{Linked}}
| The above documentation is transcluded from Template:File title/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |