Difference between revisions of "Template:UI Object Template"

From HSYCO
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Template ==
 
== 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.
 
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. To avoid the % symbol to be replaced, use &
+
 
 +
'''%<n>''' (with n starting from 1) is used to include each part of the item's label inside the HTML. To avoid the % symbol to be replaced, use '''&amp;#37;''' instead.
  
 
E.g. If the template is:
 
E.g. If the template is:

Latest revision as of 18:21, 11 March 2015

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. To avoid the % symbol to be replaced, use &#37; instead.

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>