Difference between revisions of "Template:File title"

From blackwiki
Jump to navigation Jump to search
imported>Amalthea
(Use safesubst (meta:Help:Safesubst). Better.)
imported>NeilN
m (Changed protection level of Template:File title: Highly visible template ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
 
       | {{{{{|safesubst:}}}ns:File}}:{{{{{|safesubst:}}}#if:X|{{{1|}}}}}
 
       | {{{{{|safesubst:}}}ns:File}}:{{{{{|safesubst:}}}#if:X|{{{1|}}}}}
 
     }}
 
     }}
   | <!-- Empty first parameter -->
+
   |
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
  
 
</noinclude>
 
</noinclude>

Latest revision as of 14:24, 31 August 2015

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

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