Difference between revisions of "Template:Item"

From LeikaRO wiki
Jump to: navigation, search
(Created page with "|<noinclude> This is an auxiliary template allowing to encode "<code>|</code>" within template and parser function parameters. To get the symbol in final output this template...")
 
Line 1: Line 1:
|<noinclude>
+
<includeonly>{{plainlink |url={{database}}/item-info/{{#sub: {{{id}}}|0|{{#pos:{{{id}}}| }}}}/ {{#sub:{{{id}}}|{{#pos:{{{id}}}| }}}}}}</includeonly><noinclude>==Description==
 +
This template serves the purpose of shortening linkings to the [{{database}}/item-info/ iW Database View Item] for the ease of article overview when editing and consistency.
  
This is an auxiliary template allowing to encode "<code>|</code>"
+
====Usage====
within template and parser function parameters. To get the symbol in final output this template is unnecessary, better use "<code>&amp;#124;</code>" which is rendered the same. Use this template in parameter values of templates and parser functions of which the result is used in table syntax, since this requires the "real" pipe character.
+
<nowiki>{{item |id=</nowiki>''<id>''<nowiki> </nowiki>''<name>''<nowiki>}}</nowiki>
  
This template cannot be used for putting the character as text in a wiki table; in that case, again, "<code>&amp;#124;</code>" can be used.
+
{| class="wikitable"
 +
! Example !! Output
 +
|-
 +
| <nowiki>{{item |id=7015 Bookclip in Memory}}</nowiki>  
 +
|| {{item |id=7015 Bookclip in Memory}}
 +
|}
  
Note that the table syntax code "<code>!</code>" (exclamation mark) can be used directly in parameter values, so for that a template like this is not needed.
+
====Fields====
 +
{| class="wikitable" style="text-align: left"
 +
| id || The ID of the item as seen in the itemdesctables.
 +
|-
 +
| name || The text to appear in the link.
 +
|}
  
This is a '''high risk template'''.
+
==See Also==
 +
*[[Template:Map]]
 +
*[[Template:Monster]]
 +
*[[Template:Item List]]
  
== See Also ==
+
[[Category:Templates|Item]]
 
+
* [http://meta.wikimedia.org/wiki/ParserFunctions#Tables Parser Function Documentation]
+
[[Category:Templates|!]]
+
 
</noinclude>
 
</noinclude>

Revision as of 06:04, 3 December 2014

Description

This template serves the purpose of shortening linkings to the iW Database View Item for the ease of article overview when editing and consistency.

Usage

{{item |id=<id> <name>}}
Example Output
{{item |id=7015 Bookclip in Memory}} Bookclip in Memory

Fields

id The ID of the item as seen in the itemdesctables.
name The text to appear in the link.

See Also