Template:Attribute: Difference between revisions
From Archaelund Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{#switch:{{{1|}}} | <onlyinclude><includeonly>{{#switch:{{{1|}}} | ||
|Text = {{#if:{{#pos:{{{2|}}}|{{{Tag|}}}}}|{{{Text|{{Missing|attribute text}}}}};}} | |Text = {{#if:{{#pos:{{{2|}}}|{{{Tag|}}}}}|{{{Text|{{Missing|attribute text}}}}};}} | ||
|Image = {{#if:{{#pos:{{{2|}}}|{{{Tag|}}}}}|[[File:{{{Image|Wanted.png}}}|24xpx|{{{Text|{{Missing|attribute text}}}}}]] | |Image = {{#if:{{#pos:{{{2|}}}|{{{Tag|}}}}}|[[File:{{{Image|Wanted.png}}}|24xpx|{{{Text|{{Missing|attribute text}}}}}]];}} | ||
|Tag = {{{Tag|}}}; | |Tag = {{{Tag|}}}; | ||
}}</includeonly></onlyinclude> | }}</includeonly></onlyinclude> | ||
{{Documentation}} | {{Documentation}} | ||
[[Category:General Templates]] | [[Category:General Templates]] | ||
Revision as of 13:46, 15 March 2020
Description
This template searches for an attribute tag within a given string and outputs a description (either as text or image) if the tag is found (otherwise the output is empty). It is not meant to be directly called from within Wiki pages, but for generating customized attribute lists in other templates.
Usage
{{Attribute|<format>|<string>
|Tag =
|Text =
|Image =
}}
Parameters
| Name | Required | Description | Values |
|---|---|---|---|
| Tag | Yes | The name of the attribute tag to be searched for in <string>. | arbitrary text |
| Text | Yes | The text to be displayed if <Tag> is found in <string>. | arbitrary text |
| Image | No | The image to be displayed if <Tag> is found in <string>. | image name (including file extension) |
Format options
Note that the output is primarily intended for building attribute lists, which is why an additional separator (semicolon) is appended.
View/Edit documentation page