Difference between revisions of "Template:UI Object Template"

From HSYCO
Jump to navigation Jump to search
(Created page with "== Template == The template is html code that is applied to every item. $<n> (with n starting from 1) is used to indicate how to include each part of the item's label inside t...")
 
Line 1: Line 1:
 
== Template ==
 
== Template ==
The template is html code that is applied to every item. $<n> (with n starting from 1) is used to indicate how to include each part of the item's label inside the html.
+
The template is HTML code that is applied to every item. An item's label is split into parts using the pipe character. These parts are replaced inside the template's code to form the final item's source.
A label can specify more than one part using the pipe character: |
+
$<n> (with n starting from 1) is used to include each part of the item's label inside the HTML.
  
 
E.g. If the template is:
 
E.g. If the template is:

Revision as of 18:17, 19 December 2014

Template

The template is HTML code that is applied to every item. An item's label is split into parts using the pipe character. These parts are replaced inside the template's code to form the final item's source. $<n> (with n starting from 1) is used to include each part of the item's label inside the HTML.

E.g. If the template is:

<table><tr><td>$1</td><td>$2</td></table>

and the labels are:

a|one,b|two

the resulting items will have the following html code:

<table><tr><td>a</td><td>one</td></table>

and

<table><tr><td>b</td><td>two</td></table>