Difference between revisions of "Template:Ability (LW2)/doc"

From UFOpaedia
Jump to navigation Jump to search
m
(Update documentation.)
Line 5: Line 5:
 
| s_image =
 
| s_image =
 
| s_caption =
 
| s_caption =
  +
| s_link =
 
| s_name =
 
| s_name =
 
| s_descr =
 
| s_descr =
Line 16: Line 17:
 
==Parameters==
 
==Parameters==
   
<code>s_image</code> : Image filename without link or prefix, but including extension, e.g. <code>Image_name.jpg</code>. This get's expanded in the template to <code>[[File:Image_name.jpg|blahblah]]</code>
+
{{Par|s_image|Image filename without link or prefix, but including extension, e.g. <code>Image_name.jpg</code>. This get's expanded in the template to <code>[[File:Image_name.jpg|blahblah]]</code>}}
   
<code>s_caption</code> : Rollover text for the main image.
+
{{Par|s_caption|Rollover text for the main image.}}
   
  +
{{Par|s_link|Title of page on wiki or URL for the main image to link to.}}
<code>s_name</code> : The perk/ability name.
 
   
 
{{Par|s_name|The perk/ability name.}}
<code>s_descr</code> : A (shortish) description of the perk.
 
   
 
{{Par|s_descr|A (shortish) description of the perk.}}
<code>s_info</code> : Rollover text for the info icon. In practice this should always point to the template's <code>Info</code> subpage via transclusion (see skeleton above) so that it can be referenced elsewhere easily.
 
   
 
{{Par|s_info|Rollover text for the info icon. In practice this should always point to the template's <code>Info</code> subpage via transclusion (see skeleton above) so that it can be referenced elsewhere easily.}}
<code>b_name</code> : Set if name is visible. 0 = invisible. 1 = visible. Default 1.
 
   
<code>b_descr</code> : Set if description is visible. 0 = invisible. 1 = visible. Default 0.
+
{{Par|b_name|Set if name is visible. 0 = invisible. 1 = visible. Default 1.}}
   
<code>b_info</code> : Set if info icon is visible. 0 = invisible. 1 = visible. Default 0.
+
{{Par|b_descr|Set if description is visible. 0 = invisible. 1 = visible. Default 0.}}
  +
 
{{Par|b_info|Set if info icon is visible. 0 = invisible. 1 = visible. Default 0.}}
   
 
===Notes About the Boolean Parameters===
 
===Notes About the Boolean Parameters===
Line 40: Line 43:
 
==Bugs==
 
==Bugs==
   
===Fixed===
 
 
If using this in [[Template:Class_Tree_(LW2)]] you need to add a line break after this template.
 
 
<strike>If this template is used inside a [[Template:Class_Tree_(LW2)]] and <code>b_info</code> is not <code>true</code>, then for some blasted reason the text overflows the cells. With <code>b_info</code> set, the text behaves and stays inside the table's cells as they should. (How very, very annoying.)
 
 
The text also behaves if this template is instead used inside a subst: version of the Class_Tree template. It could be some weird issue with the parser/template-rendering-parsing-dohicky.
 
 
Update: It appears that for some reason, the subst: version has a bunch of line breaks it in the source code. Weird.</strike>
 
   
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Revision as of 13:10, 2 February 2017

Skeleton

{{Ability_(LW2)
| s_image =
| s_caption = 
| s_link =
| s_name = 
| s_descr =
| s_info = {{ {{subst:FULLPAGENAME}}/Info }}
| b_name = {{{ b_name | 1 }}}
| b_descr = {{{ b_descr | 0 }}}
| b_info = {{{ b_info | 0 }}}
}}

Parameters

s_image : Image filename without link or prefix, but including extension, e.g. Image_name.jpg. This get's expanded in the template to blahblah

s_caption : Rollover text for the main image.

s_link : Title of page on wiki or URL for the main image to link to.

s_name : The perk/ability name.

s_descr : A (shortish) description of the perk.

s_info : Rollover text for the info icon. In practice this should always point to the template's Info subpage via transclusion (see skeleton above) so that it can be referenced elsewhere easily.

b_name : description

b_descr : description

b_info : description

Notes About the Boolean Parameters

The skeleton above treats these as passthroughs. It is expected that these parameters will be set wherever someone wants to include the ability info, and not inside the template itself. The skeleton above will take the parameters given from the initial call (say from the Main Page) and pass them on to this template.

If that didn't make sense, look at Category:Perks (Long War 2) for examples.

Bugs