Template:TWI: Difference between revisions
Content added Content deleted
mNo edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq: {{{4|}}}|nolink|[[File:{{{1}}}|{{#if: {{{3|}}} | {{{3}}} | 15px}}]] {{{2}}}| [[File:{{{1}}}|{{#if: {{{3|}}} | {{{3}}} | 15px}}|link={{{2}}}]] [[{{{2}}}]]}}<noinclude> |
{{#ifeq: {{{4|}}}|nolink|[[File:{{{1}}}|{{#if: {{{3|}}} | {{{3}}} | 15px}}]] {{{2}}}| [[File:{{{1}}}|{{#if: {{{3|}}} | {{{3}}} | 15px}}|link={{{2}}}]] [[{{{2}}}{{#if: {{{5|}}} | {{!}}{{{5}}} | }}]]}}<noinclude><br> |
||
{{Documentation}} |
|||
<!-- [[File:{{{1}}}|{{#if: {{{3|}}} | {{{3}}} | 15px}}|link={{{2}}}]] [[{{{2}}}]] --> |
|||
== Usage == |
|||
This template is used to display an image with an optional link to a specified page.<br> |
|||
To display the image with a link:<br> |
|||
<nowiki>{{TWI|ImageName.jpg|DestinationPage}}</nowiki> |
|||
To display the image with a link and custom size:<br> |
|||
<nowiki>{{TWI|ImageName.jpg|DestinationPage|30px}}</nowiki> |
|||
To display the image without a link:<br> |
|||
<nowiki>{{TWI|ImageName.jpg|DestinationPage|4=nolink}}</nowiki> |
|||
== Parameters == |
|||
* '''1''': The name of the image file. |
|||
* '''2''': The destination page to which the image will link. |
|||
* '''3''': (Optional) The size of the image. If not specified it is 15px |
|||
* '''4''': (Optional) Specify 'link' to include a link with the image. Specify 'nolink' to exclude a link. If this parameter is not provided (or invalid), a link will be included by default. |
|||
== Examples == |
|||
<nowiki>{{TWI|Flag_of_Aiir.svg|Aïr}}</nowiki><br> |
|||
{{TWI|Flag_of_Aiir.svg|Aïr}}<br> |
|||
<nowiki>{{TWI|Flag_of_Aiir.svg|Aïr|50px}}</nowiki><br> |
|||
{{TWI|Flag_of_Aiir.svg|Aïr|50px}} |
|||
<nowiki>{{TWI|Flag_of_Aiir.svg|Aïr|4=nolink}}</nowiki><br> |
|||
{{TWI|Flag_of_Aiir.svg|Aïr|4=nolink}}<br> |
|||
</noinclude> |
</noinclude> |
Latest revision as of 14:53, 30 March 2024
[[File:{{{1}}}|15px|link={{{2}}}]] [[{{{2}}}]]
Page Module:Documentation/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "plain text").
Usage[edit source]
This template is used to display an image with an optional link to a specified page.
To display the image with a link:
{{TWI|ImageName.jpg|DestinationPage}}
To display the image with a link and custom size:
{{TWI|ImageName.jpg|DestinationPage|30px}}
To display the image without a link:
{{TWI|ImageName.jpg|DestinationPage|4=nolink}}
Parameters[edit source]
- 1: The name of the image file.
- 2: The destination page to which the image will link.
- 3: (Optional) The size of the image. If not specified it is 15px
- 4: (Optional) Specify 'link' to include a link with the image. Specify 'nolink' to exclude a link. If this parameter is not provided (or invalid), a link will be included by default.
- 5: (Optional) Make the text a different text than the linked page.
Examples[edit source]
{{TWI|Flag_of_Aiir.svg|Aïr}}
Aïr
{{TWI|Flag_of_Aiir.svg|Aïr|50px}}
Aïr
{{TWI|Flag_of_Aiir.svg|Aïr|4=nolink}}
Aïr
{{TWI|Flag_of_Aiir.svg|Aïr|5=Aiir}}
Aiir