Difference between revisions of "Template:Iffile"

From Self-sufficiency
Jump to: navigation, search
m (1 revision)
(Created page with '{{#ifeq:{{NAMESPACE}}|Image|{{{1|}}}}}<noinclude> ---- For use in templates that add images to categories (while ignoring all other namespaces). Short for <code>...')
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{#ifeq:{{NAMESPACE}}|File|{{{1|}}}}}<noinclude>
+
{{#ifeq:{{NAMESPACE}}|Image|{{{1|}}}}}<noinclude>
  
{{Documentation}}
 
  
 +
----
 +
For use in templates that add images to categories (while ignoring all other namespaces). Short for <code><nowiki>{{#ifeq:{{NAMESPACE}}|Image|</nowiki></code>...<code>}}</code>.
 +
 +
For example, something like <nowiki>{{ifimage|[[Category:Some media only category]]}}</nowiki> might go in a template that's only suppose 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.
 +
 +
[[Category:Function templates|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Revision as of 05:02, 14 June 2008



For use in templates that add images to categories (while ignoring all other namespaces). Short for {{#ifeq:{{NAMESPACE}}|Image|...}}.

For example, something like {{ifimage|[[Category:Some media only category]]}} might go in a template that's only suppose to categorize images. Of course, <includeonly> tags aren't needed since it won't affect templates. No type of category suppression (e.g. category= or |nocat) is needed on demo/example pages.