Difference between revisions of "Template:Iffile"

From Self-sufficiency
Jump to: navigation, search
m (moved Template:Ifimage to Template:Iffile: per namespace move)
m (8 revisions from commons:Template:Iffile)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{#ifeq:{{NAMESPACE}}|File|{{{1|}}}}}<noinclude>
 
{{#ifeq:{{NAMESPACE}}|File|{{{1|}}}}}<noinclude>
  
 +
{{Documentation}}
  
----
 
For use in templates that add images to categories (while having no effect in all other namespaces). Short for <code><nowiki>{{#ifeq:{{NAMESPACE}}|File|</nowiki></code>...<code>}}</code>.
 
 
For example, something like <nowiki>{{ifimage|[[Category:Some media only category]]}}</nowiki> might go in a template that's only supposed to categorize images. Of course, <nowiki><includeonly></nowiki> tags aren't needed since it won't affect templates. No type of category suppression (e.g. <code>category=</code> or <code>|nocat</code>) is needed on demo/example pages either.
 
 
[[Category:Function templates|{{PAGENAME}}]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 20:36, 29 September 2010