Template:Attribute

From Archaelund Wiki

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

NameRequiredDescriptionValues
TagYesThe name of the attribute tag to be searched for in <string>.arbitrary text
TextYesThe text to be displayed if <Tag> is found in <string>.arbitrary text
ImageNoThe image to be displayed if <Tag> is found in <string>.image name (including file extension)

Format options

FormatDescriptionExample output
TextOutputs the text specified in parameter <Text>, followed by a semicolon.test attribute;
ImageOutputs the image specified in parameter <Image>, followed by a semicolon. The text specified in parameter <Text> is shown as a tooltip.test attribute;
TagOutputs the tag specified in parameter <Tag>, followed by a semicolon.Test;

Note that the output is primarily intended for building attribute lists, which is why an additional separator (semicolon) is appended.


View/Edit documentation page