Difference between revisions of "Template:Infobox:SectionList"

From Cantr II Wiki
Jump to: navigation, search
m (Template:Infobox:SeccionLista moved to Template:Infobox:SectionList: Part of a translation process.)
m
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><table style="background-color: #F9F9F9; width:100%; text-align:left; font-size: 95%; margin:4px 0 0 0;" cellpadding="0px" border="0px" cellspacing="0px"><tr><th style="background-color:#{{if|test={{{color|}}}|then={{{color}}}|else=FFFFFF}}; text-align:center" colspan="2"><!-- Titulo -->{{{tituloseccion|ERROR TITULO SECCION}}}</th></tr><tr><th style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px;"><!-- Titulo columna izquierda -->{{{tituloizq|ERROR TITULO IZQUIERDA}}}
+
<includeonly><table style="background-color: #F9F9F9; width:100%; text-align:left; font-size: 95%; margin:4px 0 0 0;" cellpadding="0px" border="0px" cellspacing="0px"><tr><th style="background-color:#{{if|test={{{color|}}}|then={{{color}}}|else=FFFFFF}}; text-align:center" colspan="2"><!-- Title -->{{{title|SECTION TITLE ERROR}}}</th></tr><tr><th style="width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px;"><!-- Left column title -->{{{ltitle|LEFT TITLE ERROR}}}
 
----
 
----
</th><th><!-- Titulo columna derecha -->{{{tituloder|ERROR TITULO DERECHA}}}
+
</th><th style="text-align:right;"><!-- Right column title -->{{{rtitle|RIGHT TITLE ERROR}}}
 
----
 
----
</th></tr><!-- Inclusion de lineas de informacion-->{{if|test={{{item0|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item0|ERROR ITEM 0}}}</td><td style="vertical-align:text-top;">{{{info0|ERROR INFO 0}}}</td></tr>|else=}}{{if|test={{{item1|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item1|ERROR ITEM 1}}}</td><td style="vertical-align:text-top;">{{{info1|ERROR INFO 1}}}</td></tr>|else=}}{{if|test={{{item2|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item2|ERROR ITEM 2}}}</td><td style="vertical-align:text-top;">{{{info2|ERROR INFO 2}}}</td></tr>|else=}}{{if|test={{{item3|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item3|ERROR ITEM 3}}}</td><td style="vertical-align:text-top;">{{{info3}}}</td></tr>|else=}}{{if|test={{{item4|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item4|ERROR ITEM 4}}}</td><td style="vertical-align:text-top;">{{{info4|ERROR INFO 4}}}</td></tr>|else=}}{{if|test={{{item5|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item5|ERROR ITEM 5}}}</td><td style="vertical-align:text-top;">{{{info5|ERROR INFO 5}}}</td></tr>|else=}}{{if|test={{{item6|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item6|ERROR ITEM 6}}}</td><td style="vertical-align:text-top;">{{{info6|ERROR INFO 6}}}</td></tr>|else=}}{{if|test={{{item7|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item7|ERROR ITEM 7}}}</td><td style="vertical-align:text-top;">{{{info7|ERROR INFO 7}}}</td></tr>|else=}}{{if|test={{{item8|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item8|ERROR ITEM 8}}}</td><td style="vertical-align:text-top;">{{{info8|ERROR INFO 8}}}</td></tr>|else=}}{{if|test={{{item9|}}}|then=<tr><td style="width:{{if|test={{{ancholinea|}}}|then={{{ancholinea}}}|else=200}}px; vertical-align:text-top;">{{{item9|ERROR ITEM 9}}}</td><td style="vertical-align:text-top;">{{{info9|ERROR INFO 9}}}</td></tr>|else=}}<!-- Inclusion de contenido adicional -->{{if|test={{{contenido|}}}|then=<tr><td>{{{contenido|ERROR CONTENIDO SECCION}}}</td></tr>|else=}}</table></includeonly><noinclude>{{Doc}}[[Category:Meta-Plantillas|{{PAGENAME}}]]</noinclude>
+
</th></tr><!-- Inclusion of information lines-->{{if|test={{{item0|}}}|then=<tr><td style="background-color:#E6E6E6; width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item0|ERROR ITEM 0}}}</td><td style="background-color:#E6E6E6; text-align:right; vertical-align:middle;">{{{info0|ERROR INFO 0}}}</td></tr>|else=}}{{if|test={{{item1|}}}|then=<tr><td style="width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item1|ERROR ITEM 1}}}</td><td style="text-align:right; vertical-align:middle;">{{{info1|ERROR INFO 1}}}</td></tr>|else=}}{{if|test={{{item2|}}}|then=<tr><td style="background-color:#E6E6E6; width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item2|ERROR ITEM 2}}}</td><td style="background-color:#E6E6E6; text-align:right; vertical-align:middle;">{{{info2|ERROR INFO 2}}}</td></tr>|else=}}{{if|test={{{item3|}}}|then=<tr><td style="width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item3|ERROR ITEM 3}}}</td><td style="text-align:right; vertical-align:middle;">{{{info3}}}</td></tr>|else=}}{{if|test={{{item4|}}}|then=<tr><td style="background-color:#E6E6E6; width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item4|ERROR ITEM 4}}}</td><td style="background-color:#E6E6E6; text-align:right; vertical-align:middle;">{{{info4|ERROR INFO 4}}}</td></tr>|else=}}{{if|test={{{item5|}}}|then=<tr><td style="width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item5|ERROR ITEM 5}}}</td><td style="text-align:right; vertical-align:middle;">{{{info5|ERROR INFO 5}}}</td></tr>|else=}}{{if|test={{{item6|}}}|then=<tr><td style="background-color:#E6E6E6; width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item6|ERROR ITEM 6}}}</td><td style="background-color:#E6E6E6; text-align:right; vertical-align:middle;">{{{info6|ERROR INFO 6}}}</td></tr>|else=}}{{if|test={{{item7|}}}|then=<tr><td style="width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item7|ERROR ITEM 7}}}</td><td style="text-align:right; vertical-align:middle;">{{{info7|ERROR INFO 7}}}</td></tr>|else=}}{{if|test={{{item8|}}}|then=<tr><td style="background-color:#E6E6E6; width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item8|ERROR ITEM 8}}}</td><td style="background-color:#E6E6E6; text-align:right; vertical-align:middle;">{{{info8|ERROR INFO 8}}}</td></tr>|else=}}{{if|test={{{item9|}}}|then=<tr><td style="width:{{if|test={{{width|}}}|then={{{width}}}|else=200}}px; vertical-align:text-top;">{{{item9|ERROR ITEM 9}}}</td><td style="text-align:right; vertical-align:middle;">{{{info9|ERROR INFO 9}}}</td></tr>|else=}}<!-- Inclusion of adicional content -->{{if|test={{{content|}}}|then=<tr><td>{{{content|SECTION CONTENT ERROR}}}</td></tr>|else=}}</table></includeonly><noinclude>{{Doc}}[[Category:Meta-Templates|!{{PAGENAME}}]]</noinclude>

Latest revision as of 11:01, 7 May 2010

Template documentation[ view ] [ discuss ] [edit]

{{Infobox:SectionList}} is a meta-template, ie a template for creating templates. This template is intended to be used in line with the template Template:Infobox:Base.

With this template you can create a table containing a title and a list of ten items or less. It can set the background color of the title and the width of column left.

Usage

Put the following code in the template being designed. Complete the parameters you want, delete the unused.

{{Infobox:SectionList
| color   = 
| title   = 
| width   = 
| ltitle  = 
| rtitle  = 
| item0   = 
| info0   = 
| item1   = 
| info1   = 
| item2   = 
| info2   = 
| item3   = 
| info3   = 
| item4   = 
| info4   = 
| item5   = 
| info5   = 
| item6   = 
| info6   = 
| item7   = 
| info7   = 
| item8   = 
| info8   = 
| item9   = 
| info9   = 
| content = 
}}

Parameters

  • color - Background color of table title in hexacecimal without the "#". The default is "FFFFFF" (white).
  • title - The title of the table. This parameter is required.
  • width - Width of the left column (in pixels). The default is 200.
  • ltitle - Title of the left column. This parameter is required.
  • rtitle - Title of the right column. This parameter is required.
  • itemx - Item number x in the left column. Replacing "x" by a number from 0 to 9. Use together with the following parameter.
  • infox - Information number x in the right column. Replacing "x" by a number from 0 to 9. Shown only if defined itemx
  • content - This parameter can be used to add additional content to the table.

You can complete the parameter content including other templates, such as Template:Infobox:Section and other Template:Infobox:SectionList. But do not include other template Template:Infobox:Header in this parameter. That template is intended only to lead the table.

Examples

Copy and paste on a page to see the results.

{{Infobox:Base
| width   = 200
| content = {{Infobox:Header
| color   = B8DB82
| width   = 200
| title   = Basil
| image   = Albahaca basil.jpg
| content = {{Infobox:SectionList
| color   = D6EAB7
| title   = Gathering rates
| width   = 150
| ltitle  = Method
| rtitle  = Amount
| item0   = Manual
| info0   = 115
| item1   = [[Bronze scissors]]
| info1   = 172
| item2   = [[Scissors]]
| info2   = 230
}}}}}}

See also