This is an archive copy of wikilivres.ca as of 18 February 2017 (from the WikiTeam dump). The original site is closed.
Template:Ifimage: Difference between revisions
Jump to navigation
Jump to search
imported>Rocket000 ←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>...' |
imported>Yann m 7 revisions |
||
| (6 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{#ifeq:{{NAMESPACE}}| | {{#ifeq:{{NAMESPACE}}|File|{{{1|}}}}}<noinclude> | ||
---- | ---- | ||
For use in templates that add images to categories (while | 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 | 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}}]] | [[Category:Function templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 15:40, 13 July 2009
For use in templates that add images to categories (while having no effect in all other namespaces). Short for {{#ifeq:{{NAMESPACE}}|File|...}}.
For example, something like {{ifimage|[[Category:Some media only category]]}} might go in a template that's only supposed 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 either.