Template:EnumImage: Difference between revisions
(refactoring my mess) |
(i hate mediawiki syntax) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if: {{{image|}}} | [[File:{{{image}}} | <includeonly>{{#if: {{{image|}}} | ||
</includeonly><noinclude> | | [[File:{{{image}}} | {{#if:{{{options|}}} | ||
==Purpose== | | {{{options}}} | ||
| {{!}}{{#if: {{{name|}}} | |||
| alt={{{name}}}}}{{!}}link=}}{{!}}{{{name|}}}]]{{#if:{{{both|}}} | {{{name}}}}} | |||
| {{{name}}} | |||
| | |||
}}</includeonly><noinclude>==Purpose== | |||
Shortcut template for images/strings in the enum templates. | Shortcut template for images/strings in the enum templates. | ||
==Parameter List== | ==Parameter List== | ||
Line 28: | Line 33: | ||
<pre>{{EnumImage|name=Clementine}}</pre> | <pre>{{EnumImage|name=Clementine}}</pre> | ||
{{EnumImage|name=Clementine}} | {{EnumImage|name=Clementine}} | ||
===Clem Logos in a Centered Table=== | |||
<pre>{| class="wikitable" style="margin:auto" | |||
|+ Caption text | |||
|- | |||
! Header text | |||
|- | |||
| {{EnumImage|image=ClemLogo.png}}{{EnumImage|image=ClemLogo.png}} | |||
|}</pre> | |||
{| class="wikitable" style="margin:auto" | |||
|+ Caption text | |||
|- | |||
! Header text | |||
|- | |||
| {{EnumImage|image=ClemLogo.png}}{{EnumImage|image=ClemLogo.png}} | |||
|} | |||
</noinclude> | </noinclude> |
Latest revision as of 14:48, 31 December 2023
Purpose
Shortcut template for images/strings in the enum templates.
Parameter List
{{EnumImage |name <!-- Text string provided for alt-text and caption text. --> |image <!-- Image path. If left empty, will display the name only. --> |both <!-- Whether the name should be added after the image. Ignored if image is left blank. Any non-empty value is treated as true. --> |options <!-- The desired image options. If options aren't provided, the link to the image is disabled and alt-text is left blank. --> }}
For image options, a guide on syntax can be found here: [1]
Examples
image="ClemLogo.png"
{{EnumImage|image=ClemLogo.png}}
image="ClemLogo.png" and name="Clementine"
{{EnumImage|image=ClemLogo.png|name=Clementine}}
image="ClemLogo.png", name="Clementine" and options="24px"
{{EnumImage|image=ClemLogo.png|name=Clementine|options=24px}}
image="ClemLogo.png", name="Clementine", options="24px" and both="1"
{{EnumImage|image=ClemLogo.png|name=Clementine|options=24px|both=1}}
name="Clementine"
{{EnumImage|name=Clementine}}
Clementine
Clem Logos in a Centered Table
{| class="wikitable" style="margin:auto" |+ Caption text |- ! Header text |- | {{EnumImage|image=ClemLogo.png}}{{EnumImage|image=ClemLogo.png}} |}
Header text |
---|
![]() ![]() |