Template:Main page image/DYK
[[File:Example-serious.jpg{{#ifeq:|yes||border|}}|{{#if:140|140|120}}px{{#if: | | | {{#if:Caption goes here. | |Caption goes here. | |}}}}{{#if: | |alt=}}{{#if: | {{#ifeq:|Example-serious.jpg|| |link=File: }}}}{{#if:
| |thumbtime= }}{{#if: | |class=}}]]{{#if: Caption goes here.|
{{#ifeq:dyk |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:Main page image
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
| File:Cascade-protection-shackle.svg | This template can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
This template is used to automatically put DYK images into the correct format. Currently, it automatically determines the width of the image based on a ratio of the dimensions. It is a wrapper around {{Main page image}}.
Usage
Note: Prefer images in landscape orientation. If you must use one in portrait orientation, avoid very skinny ones. If you must choose a skinny image, note that if you do so, there will be a gap between left or right edge of the image (depending on the what side of the container the template appears) and the edge of the section.
Note that width should not be specified. It is automatically calculated.
<syntaxhighlight lang="wikitext">
[[File:{{#ifeq:|yes||border|}}|{{#if:||120}}px{{#if: | | | {{#if: | | | |}}}}{{#if: | |alt=}}{{#if: | {{#ifeq:||| |link=File: }}}}{{#if:
| |thumbtime= }}{{#if: | |class=}}]]{{#if: |
}}</syntaxhighlight>
{{safesubst:#if:{{safesubst:#ifeq:DYK|sandbox|1}}{{safesubst:#ifeq:DYK|doc|1}}|| }}