Template:InfoboxSimpleLine

From Istaria Lexica

Revision as of 13:39, 11 November 2022 by Easton West (talk | contribs) (seo: just evaluate to nothing, instead of display:none)
Template documentation (for the template shown above, sometimes hidden or invisible)

Description[edit]

Non-standalone template for use in certain infobox templates.

This template adds a line of key/value columns to a table (Like Template:InfoboxStart). Used mainly for complicated #if statements to avoid rendering and formatting issues (a workaround if you like..).

  • Find pages using this template
  • provides a two-columned key-value pair
  • provides table cell styling
  • auto-hides if either key or value are missing
  • can be forced to hide
  • provides Semantik MediaWiki properties
  • also provides hidden SMW annotations


Syntax[edit]

{{InfoboxSimpleLine|name=|value=|style=|property=|silent=|hide=}}

Parameters[edit]

{{InfoboxSimpleLine
|name     = Name of the value (i.e. Bulk, Price, Health, ...)
|value    = The value. May be a simple text or one or more links like [[Sandstone]]. Keep in mind that links will mess up the 'property' and 'silent' features!
|style    = Hand over a CSS style for the table cells (i.e. border: 1px solid black)
|property = Semantic MediaWiki property name for the value. NOTE: Do not use links in 'name' if using that.
|silent   = Set to true if you do not want the (property) value to be linked.
|hide     = Set to true if you want to force the row to be hidden at all times.

}}

Examples[edit]

Simple values:[edit]

{{InfoboxSimpleLine
|name   = Price:
|value  = 2s 350c
|style  = padding: 0
}}

Multiple and linked values[edit]

{{InfoboxSimpleLine
|name   = Attack types:
|value  = [[Flame]], [[Blight]]
|style  = background-color: lightgreen;
}}

SMW property, using the silent annotation[edit]

{{InfoboxSimpleLine
|name     = Attack Type:
|value    = Slash
|property = attack_type
|silent   = true
}}

Force-hide the whole row[edit]

{{InfoboxSimpleLine
|name     = Attack Type:
|value    = Slash
|property = attack_type
|silent   = true
|hide     = true
}}
Visit Template:InfoboxSimpleLine/doc to edit this text. (How to: document correctly)