Difference between revisions of "Template:Table cell templates"

From Pangaea Wiki
Jump to: navigation, search
m
(Cell-templates on pangaea wiki)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
==How to use Table Cell Templates==
== {{navbar|Table cell templates|text=How to use Table Cell Templates -}}==
+
*You put the cell-template within a "cell" of the table.
+
*You cannot combine two templates in one cell, or add your own styling if the template does not include it.
+
*You cannot add <code>style=</code> into the same cell, since it will conflict with the template. Sometimes the template itself will allow you to add styling
+
 
<pre style="width:300px;float:left;margin:20px;">
 
<pre style="width:300px;float:left;margin:20px;">
 
...
 
...
Line 12: Line 8:
 
</pre>
 
</pre>
 
{| class="wikitable" width="150px"  
 
{| class="wikitable" width="150px"  
!{{Yes}} ||{{No}} ||rowspan=2 {{some}}
+
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
 
|-
 
|-
 
|colspan=2 {{any}}
 
|colspan=2 {{any}}
 
|}
 
|}
 
{{clear}}
 
{{clear}}
 +
 +
*You put the cell-template within a "cell" of the table.
 +
*to use <code>colspan</code> or <code>rowspan</code> with the template you need to add them in front of the template
 +
*You cannot combine two templates in one cell
 +
*you cannot add any styling to the cell since it will conflict with the template.
 +
*Each cell-template has it's own parameters, these are some common ones that might apply:
 +
*:<code>| 1 =</code> (the first parameter) allows you to replace the default text <code><nowiki>{{yes|custom text}}</nowiki></code>
 +
*:<code>| align =</code> sets the text alignment
 +
*:<code>| style =</code> allows you to add custom styling
 +
 +
===Cell-templates on pangaea wiki===
 +
{| class=wikitable
 +
! template || code || example
 +
|-
 +
| yes || {{tl|yes}} || {{yes}}
 +
|-
 +
| no || {{tl|no}} || {{no}}
 +
|-
 +
| any || {{tl|any}} || {{any}}
 +
|-
 +
| n/a || {{tl|n/a}} || {{n/a}}
 +
|-
 +
| checked || {{tl|checked}} || {{checked}}
 +
|-
 +
| unchecked || {{tl|unchecked}} || {{unchecked}}
 +
|}

Latest revision as of 21:06, 15 August 2018

How to use Table Cell Templates

...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 {{Any}}
...
Yes No N/A
Any
  • You put the cell-template within a "cell" of the table.
  • to use colspan or rowspan with the template you need to add them in front of the template
  • You cannot combine two templates in one cell
  • you cannot add any styling to the cell since it will conflict with the template.
  • Each cell-template has it's own parameters, these are some common ones that might apply:
    | 1 = (the first parameter) allows you to replace the default text {{yes|custom text}}
    | align = sets the text alignment
    | style = allows you to add custom styling

Cell-templates on pangaea wiki

template code example
yes {{yes}} Yes
no {{no}} No
any {{any}} Any
n/a {{n/a}} N/A
checked {{checked}} Checked
unchecked {{unchecked}} Unchecked