Badge time.png   The Paragon Wiki Archive documents the state of City of Heroes/Villains as it existed on December 1, 2012.

Difference between revisions of "Template:Image"

From Paragon Wiki Archive
Jump to: navigation, search
(template to make it easier to transclude images with DPL)
 
(adding the Image property)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><section begin={{{2|Image}}} />[[Image:{{{1}}}]]<section end={{{2|Image}}} /></includeonly><noinclude>
+
<includeonly>[[Image::File:{{{1}}}]]</includeonly><noinclude>{{Documentation}}</noinclude>
==Overview==
+
 
+
This template displays an image and wraps it in DPL section label tags so that it can be easily transcluded later. By default, the section label will be "Image", but this can be overridden.
+
 
+
This is particularly useful because articles on items (such as badges or salvage) often contain an image that represents the article, but the image often isn't isolated in a section of its own. This template allows these images to be easily extracted for use in other templates or pages.
+
 
+
== Usage ==
+
 
+
* <nowiki>{{Image|Image.png}}</nowiki> will display the image Image.png, wrapping it in a section named "Image".
+
* <nowiki>{{Image|Image.png|Name}}</nowiki> will display the image Image.png, wrapping it in a section named "Name".
+
 
+
== Examples ==
+
{| class=wikitable
+
|-
+
! Template Call !! Visible Result !! Label (not visible)
+
|-
+
| <nowiki>{{Image|Salvage Brass.png}}</nowiki> || {{Image|Salvage Brass.png}} || Image
+
|-
+
| <nowiki>{{Image|Salvage Brass.png|Brass Salvage}}</nowiki> || {{Image|Salvage Brass.png|Brass Salvage}} || Brass Salvage
+
|}
+

Latest revision as of 05:32, 29 June 2012

[edit] [purge] Documentation


Overview

This template displays an image. Including the image in a template makes it easier to transclude through DPL.

This is particularly useful because articles on items (such as badges or salvage) often contain an image that represents the article, but the image often isn't isolated in a section of its own. This template allows these images to be easily extracted for use in other templates or pages.

Important Note: This template isn't meant to be used to display all images. It should only be used at most once on a given page, and should only be used on the image that would best represent the page. For badges, this would be the badge icon. For salvage, this would be the salvage image. If you're just displayed a normal image, or if the article is about more than a single, narrowly-defined item, you probably just want to include the image normally.

Important Note: If you notice that an article is using the Image template, please do not undo it unless you know it's safe to do so. If you undo the templating, you'll very likely be breaking a bunch of pages that are relying on it.

Usage

  • {{Image|image name}}

where:

image name
Name of the image file on the wiki, including any suffix.

Example

Template Call Result
{{Image|Salvage Brass.png}} File:Salvage Brass.png