Diferencia entre revisiones de «Plantilla:Infobox/doc»
m (1 revisión: Plantilla Infobox) |
m (Texto reemplazado: « » por « ») |
||
(No se muestran 3 ediciones intermedias del mismo usuario) | |||
Línea 1: | Línea 1: | ||
+ | Todo el contenido de esta página está escondido como comentario. Para ver su contenido, cliquear en "Editar". | ||
{{documentation subpage}} | {{documentation subpage}} | ||
− | <!-- | + | <!-- |
− | + | ||
This template is intended as a meta-template: a template used for constructing other templates. It is not meant for use directly in an article, but can be used on a one-off basis if required. See [[Help:Infobox]] for an introduction to infoboxes and information on how to design them. See [[:Category:Infobox templates]] for specific infobox templates. | This template is intended as a meta-template: a template used for constructing other templates. It is not meant for use directly in an article, but can be used on a one-off basis if required. See [[Help:Infobox]] for an introduction to infoboxes and information on how to design them. See [[:Category:Infobox templates]] for specific infobox templates. | ||
Línea 11: | Línea 11: | ||
==== Number ranges ==== | ==== Number ranges ==== | ||
To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example: | To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example: | ||
− | <pre>|header3 | + | <pre>|header3 = Section 1 |
− | |label5 | + | |label5 = Label A |
− | |data5 | + | |data5 = Data B |
− | |label7 | + | |label7 = Label C |
− | |data7 | + | |data7 = Data C |
|header10 = Section 2 | |header10 = Section 2 | ||
− | |label12 | + | |label12 = Label D |
− | |data12 | + | |data12 = Data D</pre> |
=== Parameters === | === Parameters === | ||
Línea 108: | Línea 108: | ||
<pre> | <pre> | ||
|label5 = Population | |label5 = Population | ||
− | |data5 | + | |data5 = {{{population|}}} |
</pre> | </pre> | ||
Línea 117: | Línea 117: | ||
<pre> | <pre> | ||
|label6 = Mass | |label6 = Mass | ||
− | |data6 | + | |data6 = {{#if:{{{mass|}}}|{{{mass}}} kg}} |
</pre> | </pre> | ||
Línea 125: | Línea 125: | ||
<pre style="overflow:auto;">{{Infobox | <pre style="overflow:auto;">{{Infobox | ||
− | |name | + | |name = {{subst:PAGENAME}} |
− | |title | + | |title = Example of an optional header |
|header1 = {{#if:{{{item_one|}}}{{{item_two|}}}{{{item_three|}}}|Optional header}} | |header1 = {{#if:{{{item_one|}}}{{{item_two|}}}{{{item_three|}}}|Optional header}} | ||
− | |label2 | + | |label2 = Item one |
− | |data2 | + | |data2 = {{{item_one|}}} |
− | |label3 | + | |label3 = Item two |
− | |data3 | + | |data3 = {{{item_two|}}} |
− | |label4 | + | |label4 = Item three |
− | |data4 | + | |data4 = {{{item_three|}}} |
}}</pre> | }}</pre> | ||
Línea 142: | Línea 142: | ||
===Examples=== | ===Examples=== | ||
{{Infobox | {{Infobox | ||
− | |name | + | |name = Infobox/doc |
− | |bodystyle | + | |bodystyle = |
− | |title | + | |title = Test Infobox |
− | |titlestyle | + | |titlestyle = |
− | |image | + | |image = [[File:example.png|200px|alt=Example alt text]] |
− | |imagestyle | + | |imagestyle = |
− | |caption | + | |caption = Caption for example.png |
|captionstyle = | |captionstyle = | ||
− | |headerstyle | + | |headerstyle = background:#ccf; |
− | |labelstyle | + | |labelstyle = background:#ddf; |
− | |datastyle | + | |datastyle = |
|header1 = Header defined alone | |header1 = Header defined alone | ||
− | |label1 | + | |label1 = |
− | |data1 | + | |data1 = |
|header2 = | |header2 = | ||
− | |label2 | + | |label2 = Label defined alone does not display (needs data, or is suppressed) |
− | |data2 | + | |data2 = |
|header3 = | |header3 = | ||
− | |label3 | + | |label3 = |
− | |data3 | + | |data3 = Data defined alone |
|header4 = All three defined (header, label, data, all with same number) | |header4 = All three defined (header, label, data, all with same number) | ||
− | |label4 | + | |label4 = does not display (same number as a header) |
− | |data4 | + | |data4 = does not display (same number as a header) |
|header5 = | |header5 = | ||
− | |label5 | + | |label5 = Label and data defined (label) |
− | |data5 | + | |data5 = Label and data defined (data) |
|belowstyle = background:#ddf; | |belowstyle = background:#ddf; | ||
Línea 176: | Línea 176: | ||
<pre style="overflow:auto">{{Infobox | <pre style="overflow:auto">{{Infobox | ||
− | |name | + | |name = Infobox/doc |
− | |bodystyle | + | |bodystyle = |
− | |title | + | |title = Test Infobox |
− | |titlestyle | + | |titlestyle = |
− | |image | + | |image = [[File:example.png|200px|alt=Example alt text]] |
− | |imagestyle | + | |imagestyle = |
− | |caption | + | |caption = Caption for example.png |
|captionstyle = | |captionstyle = | ||
− | |headerstyle | + | |headerstyle = background:#ccf; |
− | |labelstyle | + | |labelstyle = background:#ddf; |
− | |datastyle | + | |datastyle = |
|header1 = Header defined alone | |header1 = Header defined alone | ||
− | |label1 | + | |label1 = |
− | |data1 | + | |data1 = |
|header2 = | |header2 = | ||
− | |label2 | + | |label2 = Label defined alone does not display (needs data, or is suppressed) |
− | |data2 | + | |data2 = |
|header3 = | |header3 = | ||
− | |label3 | + | |label3 = |
− | |data3 | + | |data3 = Data defined alone |
|header4 = All three defined (header, label, data, all with same number) | |header4 = All three defined (header, label, data, all with same number) | ||
− | |label4 | + | |label4 = does not display (same number as a header) |
− | |data4 | + | |data4 = does not display (same number as a header) |
|header5 = | |header5 = | ||
− | |label5 | + | |label5 = Label and data defined (label) |
− | |data5 | + | |data5 = Label and data defined (data) |
|belowstyle = background:#ddf; | |belowstyle = background:#ddf; | ||
Línea 215: | Línea 215: | ||
{{Infobox | {{Infobox | ||
− | |bodystyle | + | |bodystyle = width:20em; |
− | |name | + | |name = Infobox/doc |
− | |title | + | |title = Test Infobox |
− | |titlestyle | + | |titlestyle = |
|headerstyle = | |headerstyle = | ||
− | |labelstyle | + | |labelstyle = width:33% |
− | |datastyle | + | |datastyle = |
|header1 = | |header1 = | ||
− | |label1 | + | |label1 = Label 1 |
− | |data1 | + | |data1 = Data 1 |
|header2 = | |header2 = | ||
− | |label2 | + | |label2 = Label 2 |
− | |data2 | + | |data2 = Data 2 |
|header3 = | |header3 = | ||
− | |label3 | + | |label3 = Label 3 |
− | |data3 | + | |data3 = Data 3 |
|header4 = Header 4 | |header4 = Header 4 | ||
− | |label4 | + | |label4 = |
− | |data4 | + | |data4 = |
|header5 = | |header5 = | ||
− | |label5 | + | |label5 = Label 5 |
− | |data5 | + | |data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
|belowstyle = | |belowstyle = | ||
Línea 244: | Línea 244: | ||
<pre style="overflow: auto"> | <pre style="overflow: auto"> | ||
{{Infobox | {{Infobox | ||
− | |bodystyle | + | |bodystyle = width:20em; |
− | |name | + | |name = Infobox/doc |
− | |title | + | |title = Test Infobox |
− | |titlestyle | + | |titlestyle = |
|headerstyle = | |headerstyle = | ||
− | |labelstyle | + | |labelstyle = width:33% |
− | |datastyle | + | |datastyle = |
|header1 = | |header1 = | ||
− | |label1 | + | |label1 = Label 1 |
− | |data1 | + | |data1 = Data 1 |
|header2 = | |header2 = | ||
− | |label2 | + | |label2 = Label 2 |
− | |data2 | + | |data2 = Data 2 |
|header3 = | |header3 = | ||
− | |label3 | + | |label3 = Label 3 |
− | |data3 | + | |data3 = Data 3 |
|header4 = Header 4 | |header4 = Header 4 | ||
− | |label4 | + | |label4 = |
− | |data4 | + | |data4 = |
|header5 = | |header5 = | ||
− | |label5 | + | |label5 = Label 5 |
− | |data5 | + | |data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |
|belowstyle = | |belowstyle = | ||
Línea 275: | Línea 275: | ||
===Embedding=== | ===Embedding=== | ||
− | One infobox template can be embedded into another using the {{para|child}} parameter. | + | One infobox template can be embedded into another using the {{para|child}} parameter. This feature can be used to create a modular infobox, or to create more well defined logical sections. |
{{Infobox | {{Infobox | ||
| title = Top level title | | title = Top level title | ||
| data1 = {{Infobox | | data1 = {{Infobox | ||
− | + | | child = yes | |
− | + | | title = First subsection | |
− | + | | label1= Label 1.1 | |
− | + | | data1 = Data 1.1 | |
}} | }} | ||
| data2 = {{Infobox | | data2 = {{Infobox | ||
− | + | | child = yes | |
− | + | | title = Second subsection | |
− | + | | label1= Label 2.1 | |
− | + | | data1 = Data 2.1 | |
}} | }} | ||
|belowstyle = | |belowstyle = | ||
Línea 297: | Línea 297: | ||
| title = Top level title | | title = Top level title | ||
| data1 = {{Infobox | | data1 = {{Infobox | ||
− | + | | child = yes | |
− | + | | title = First subsection | |
− | + | | label1= Label 1.1 | |
− | + | | data1 = Data 1.1 | |
}} | }} | ||
| data2 = {{Infobox | | data2 = {{Infobox | ||
− | + | | child = yes | |
− | + | | title = Second subsection | |
− | + | | label1= Label 2.1 | |
− | + | | data1 = Data 2.1 | |
}} | }} | ||
|belowstyle = | |belowstyle = | ||
Línea 318: | Línea 318: | ||
<pre style="overflow:auto;"> | <pre style="overflow:auto;"> | ||
{{Infobox | {{Infobox | ||
− | |name | + | |name = {{subst:PAGENAME}} |
− | |bodystyle | + | |bodystyle = |
− | |title | + | |title = |
− | |titlestyle | + | |titlestyle = |
− | |above | + | |above = |
− | |abovestyle | + | |abovestyle = |
− | |imagestyle | + | |imagestyle = |
|captionstyle = | |captionstyle = | ||
− | |image | + | |image = |
− | |caption | + | |caption = |
− | |image2 | + | |image2 = |
− | |caption2 | + | |caption2 = |
− | |headerstyle | + | |headerstyle = |
− | |labelstyle | + | |labelstyle = |
− | |datastyle | + | |datastyle = |
− | |header1 | + | |header1 = |
− | |label1 | + | |label1 = |
− | |data1 | + | |data1 = |
− | |header2 | + | |header2 = |
− | |label2 | + | |label2 = |
− | |data2 | + | |data2 = |
− | |header3 | + | |header3 = |
− | |label3 | + | |label3 = |
− | |data3 | + | |data3 = |
− | |header4 | + | |header4 = |
− | |label4 | + | |label4 = |
− | |data4 | + | |data4 = |
− | |header5 | + | |header5 = |
− | |label5 | + | |label5 = |
− | |data5 | + | |data5 = |
− | |header6 | + | |header6 = |
− | |label6 | + | |label6 = |
− | |data6 | + | |data6 = |
− | |header7 | + | |header7 = |
− | |label7 | + | |label7 = |
− | |data7 | + | |data7 = |
− | |header8 | + | |header8 = |
− | |label8 | + | |label8 = |
− | |data8 | + | |data8 = |
− | |header9 | + | |header9 = |
− | |label9 | + | |label9 = |
− | |data9 | + | |data9 = |
|header10 = | |header10 = | ||
− | |label10 | + | |label10 = |
− | |data10 | + | |data10 = |
|header11 = | |header11 = | ||
− | |label11 | + | |label11 = |
− | |data11 | + | |data11 = |
|header12 = | |header12 = | ||
− | |label12 | + | |label12 = |
− | |data12 | + | |data12 = |
|header13 = | |header13 = | ||
− | |label13 | + | |label13 = |
− | |data13 | + | |data13 = |
|header14 = | |header14 = | ||
− | |label14 | + | |label14 = |
− | |data14 | + | |data14 = |
|header15 = | |header15 = | ||
− | |label15 | + | |label15 = |
− | |data15 | + | |data15 = |
|header16 = | |header16 = | ||
− | |label16 | + | |label16 = |
− | |data16 | + | |data16 = |
|header17 = | |header17 = | ||
− | |label17 | + | |label17 = |
− | |data17 | + | |data17 = |
|header18 = | |header18 = | ||
− | |label18 | + | |label18 = |
− | |data18 | + | |data18 = |
|header19 = | |header19 = | ||
− | |label19 | + | |label19 = |
− | |data19 | + | |data19 = |
|header20 = | |header20 = | ||
− | |label20 | + | |label20 = |
− | |data20 | + | |data20 = |
|belowstyle = | |belowstyle = | ||
Línea 459: | Línea 459: | ||
[[zh:Template:Infobox]] | [[zh:Template:Infobox]] | ||
</includeonly> | </includeonly> | ||
+ | --> |
Revisión actual del 10:19 15 nov 2016
Todo el contenido de esta página está escondido como comentario. Para ver su contenido, cliquear en "Editar".
el:Πρότυπο:Πλαίσιο πληροφοριών et:Mall:Infoboxeo:Ŝablono:Informkesto fa:الگو:دادان fi:Malline:Tietolaatikko fr:Modèle:Infobox hsb:Předłoha:Infokašćik ia:Patrono:Infobox os:Шаблон:Infobox it:Template:Infobox is:Snið:Infobox lv:Veidne:Infobox mk:Шаблон:Infobox no:Mal:Infoboks ja:Template:Infobox hu:Sablon:Infobox csb:Szablóna:Infobox ko:틀:정보상자 ka:თარგი:ინფოდაფა km:ទំព័រគំរូ:ប្រអប់ព័ត៌មាន nn:Mal:Infoboks pt:Predefinição:Info ro:Format:Infobox ru:Шаблон:Карточка sk:Šablóna:Infobox sl:Predloga:Infopolje sv:Mall:Infobox th:แม่แบบ:กล่องข้อมูล tpi:Template:Infobok tr:Şablon:Bilgi kutusu uk:Шаблон:Картка ur:Template:Infobox vi:Bản mẫu:Infobox zh:Template:Infobox </includeonly> -->