Difference between revisions of "Template:Link and Image/doc"
Jump to navigation
Jump to search
(added Template/doc.) |
(updated this doc.) |
||
Line 5: | Line 5: | ||
== Usage == | == Usage == | ||
This template has | This template has four unnamed parameters. | ||
The first parameter is the | The first parameter is the link and text, it will be the link to redirect. | ||
* if "!", then no link will be used, not implemented for text. | |||
* It will be used as text if third parameter isn't defined. | |||
The second parameter is the | The second parameter is the image, e.g.: "File:weapon_zs_bustersword.png" | ||
* If the image do not exist, then it will not be rendered. | |||
The third parameter is optional, | The third parameter is optional, it is text to be shown. | ||
The fourth parameter is optional, it is the extra parameter for image, it can be used to set the width or some others parameters | |||
* Use <nowiki>{{!}}</nowiki> instead of <nowiki>|</nowiki>. | |||
* You don't need to add <nowiki>{{!}}</nowiki> at the beginning. | |||
== Examples == | == Examples == | ||
Line 22: | Line 29: | ||
|<pre>{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png|Breaker Blade}}</pre> | |<pre>{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png|Breaker Blade}}</pre> | ||
|{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png|Breaker Blade}} | |{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png|Breaker Blade}} | ||
|- | |||
|<pre>{{Template:Link_and_Image|!|File:weapon_zs_bustersword.png|Breaker Blade}}</pre> | |||
|{{Template:Link_and_Image|!|File:weapon_zs_bustersword.png|Breaker Blade}} | |||
|- | |- | ||
|<pre>{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg}}</pre> | |<pre>{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg}}</pre> | ||
Line 28: | Line 38: | ||
|<pre>{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg|Breaker Blade}}</pre> | |<pre>{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg|Breaker Blade}}</pre> | ||
|{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg|Breaker Blade}} | |{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg|Breaker Blade}} | ||
|- | |||
|<pre>{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png||75px}}</pre> | |||
|{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png||75px}} | |||
|} | |} |
Latest revision as of 21:54, 23 June 2021
This template is used for adding an image with a text, if the image exists, then the image will be shown.
Note: This template might be limited up to 500 per page.
Usage
This template has four unnamed parameters.
The first parameter is the link and text, it will be the link to redirect.
- if "!", then no link will be used, not implemented for text.
- It will be used as text if third parameter isn't defined.
The second parameter is the image, e.g.: "File:weapon_zs_bustersword.png"
- If the image do not exist, then it will not be rendered.
The third parameter is optional, it is text to be shown.
The fourth parameter is optional, it is the extra parameter for image, it can be used to set the width or some others parameters
- Use {{!}} instead of |.
- You don't need to add {{!}} at the beginning.
Examples
Wikitext | What is rendered |
---|---|
{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png}} |
![]() |
{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png|Breaker Blade}} |
![]() |
{{Template:Link_and_Image|!|File:weapon_zs_bustersword.png|Breaker Blade}} |
![]() |
{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg}} |
Buster Sword |
{{Template:Link_and_Image|Buster Sword|False:brokenImage.jpg|Breaker Blade}} |
Breaker Blade |
{{Template:Link_and_Image|Buster Sword|File:weapon_zs_bustersword.png||75px}} |
![]() |