Changes

Template:In the news/image/doc

2,509 bytes added, 23:38, 4 August 2017
added new caption align parameter
{{Documentation subpage}}
<!-- {{lua|Module:In the news/image}} -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->

This template displays the image in [[Template:In the news]], which is in turn displayed on the main page.

== Syntax ==

<pre>
{{In the news/image
|image =
|width =
|caption =
|title =
|alt =
|link =
|border =
|caption align =
}}
</pre>

== Parameters ==

* <code>image</code> - the image filename, without the "File:" prefix. If the image doesn't exist, an error will be produced. If this is blank, the template will not output anything.
* <code>width</code> - the image size. The default is 120, which should be kept for squarish or landscape-oriented images. Portrait-oriented images should be set to 100.
* <code>caption</code> - the caption text that will appear under the image, usually as short as possible, and without wikilinks.
* <code>title</code> - a title for the image. Displayed as mouseover text. This is required if the image is specified.
* <code>alt</code> - The [[WP:ALT|alternative text]] for the benefit of those unable to see the image. Defaults to the value of {{para|title}}.
* <code>link</code> - a file to link the image to, without the "File:" prefix. If the image doesn't exist, an error will be produced. This should be used to link to the original image page if the displayed image is cropped from another image.
* <code>border</code> - If set to "yes", a small border is added around the image. Useful for images with white or transparent borders (see also [[Wikipedia:Picture tutorial#Border]]).
* <code>caption align</code> - alignment, such as left, right, or center, for the caption text that will appear under the image. If this is blank, the caption will inherit the alignment of the surrounding text.

== Example ==

<pre style="white-space: pre-wrap;">
{{In the news/image
|image = Phil Hughes cropped.jpg
|width = 100
|caption = Phillip Hughes
|title = Phillip Hughes
|alt = Phillip Hughes
|link = Phil Hughes.jpg
|border = no
}}
</pre>

{{In the news/image
|image = Phil Hughes cropped.jpg
|width = 100
|caption = Phillip Hughes
|title = Phillip Hughes
|alt = Phillip Hughes
|link = Phil Hughes.jpg
|border = no
}}

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->

}}</includeonly>