Difference between revisions of "Template:Articleimage"

From Twinsuniverse
Jump to: navigation, search
m
m (Examples)
Line 19: Line 19:
 
==Examples==
 
==Examples==
 
Common use of the articleimage include both the filename and text parameters:
 
Common use of the articleimage include both the filename and text parameters:
  <nowiki>{{articleimage|Twinsen.jpg|This is an image for article:}}</nowiki>
+
  <nowiki>{{articleimage|Twinsen.jpg|This is an image for:}}</nowiki>
  
 
:[[Image:Twinsen.jpg|This is an image for: {{PAGENAME}}]]
 
:[[Image:Twinsen.jpg|This is an image for: {{PAGENAME}}]]
Line 27: Line 27:
 
  <nowiki>{{articleimage|My Article Image.png|This is an image for article:}}</nowiki>
 
  <nowiki>{{articleimage|My Article Image.png|This is an image for article:}}</nowiki>
  
:[[Image:Divers.gif|This is an image for: {{PAGENAME}} (missing)]]
+
:[[Image:Divers.gif|This is an image for article: {{PAGENAME}} (missing)]]
  
  

Revision as of 22:59, 13 November 2012

This template makes it easier to add an image to an article, that automatically displays a default image when incorrect.

Parameters

  1. The filename of an image from Category:Images or a subcategory (no parameter name but filename is case sensitive, defaults to an empty image)
  2. The text to show in the tooltip before the page name, when hovering the image (no parameter name but text is case sensitive, defaults to "Image of")
  • nocat: Whether or not to suppress categorization in case of a nonexisting file (defaults to false, which means auto categorization).

Note: Both filenames of nonexisting files and of files that don't have a description page yet, will result in the default image to be displayed instead.

Syntax

{{articleimage|filename|text}}

Examples

Common use of the articleimage include both the filename and text parameters:

{{articleimage|Twinsen.jpg|This is an image for:}}
This is an image for: Articleimage


When a nonexisting file is specified, this is what would happen:

{{articleimage|My Article Image.png|This is an image for article:}}
This is an image for article: Articleimage (missing)


The nocat parameter may be used to suppress automatic categorization like this (any value will do):

{{articleimage|My Article Image.png|This is an image for article:|nocat=true}}

(this would render the same result as the error example above, but would not categorize under Category:Articles without an image)