An diofar eadar na mùthaidhean a rinneadh air "Teamplaid:Infobox/doc"

Content deleted Content added
b Robot: Removing tpi:Template:Infobok (missing)
No edit summary
Loidhne 1:
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
{{distinguish|Template:Userbox}}
 
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.
 
Loidhne 10:
 
==== Number ranges ====
Row numbers may be from 1 to 99 (for situations where more than 99 rows are required, see [[#Embedding|Embedding]] below). 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 = Section 1
|label5 = Label A
Loidhne 21:
 
=== Parameters ===
 
====View/discuss/edit links====
;name
;name : The template page name that the "view/discuss/edit" links should point to. You can use <nowiki>{{subst:PAGENAME}}</nowiki>. If this parameter is omitted the view/discuss/edit links will not be displayed.
:If this parameter is present, "view/discuss/edit" links will be added to the bottom of the infobox, pointing to the named template. You can use <nowiki>{{subst:PAGENAME}}</nowiki>.
 
:However this is rarely what you want, because it will send users clicking these links in an infobox in an article to the template code rather than the data in the infobox that they probably want to change.
 
====Title====
Line 42 ⟶ 46:
 
====Optional content====
;subheader, subheader2 : additional title fields which fit betweenbelow {{{title}}} and {{{above}}}.
;image, image2 : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default. See [[WP:ALT]] for more on alt text.
;caption, caption2 : Text to put underneath the images.
Line 51 ⟶ 55:
;child: See the [[#Embedding|embedding]] section for details.
 
Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a {{para|header''(n)''}} will cause the corresponding {{para|data''(n)''}}{{para|label''(n)''}} (and {{para|rowclass''(n)''}}, see below) to be ignored; the absence of a {{para|data''(n)''}} will cause the corresponding {{para|label''(n)''}} to be ignored. Valid combinations for any single row are:
Note: currently, headers, labels and data items with the same n-value are not mutually exclusive; all of them will be displayed. See the rendering of header4, label4, and data4 in the examples section below.
*{{para|header''(n)''}} {{para|class''(n)''}}
*{{para|data''(n)''}} {{para|rowclass''(n)''}} {{para|class''(n)''}}
*{{para|label''(n)''}} {{para|data''(n)''}} {{para|rowclass''(n)''}} {{para|class''(n)''}}
See the rendering of header4, label4, and data4 in the examples section below.
 
====Optional CSS styling====
Line 71 ⟶ 79:
; subheaderclass : This parameter is inserted into the "class" attribute for the infobox's subheader.
; subheaderrowclass : This parameter is inserted into the "class" attribute for the complete table row the subheader is on.
;imageclass : This parameter is inserted into the "class" attribute for the image; it is in particular used in conjunction with {{tl|Image class names}}.
; imagerowclass1, imagerowclass2 : These parameters are inserted into the "class" attribute for the complete table row the respective images are on.
;rowclass(n) : This parameter is inserted into the "class" attribute for the specified row '''including''' the label or other explanatory text.
Line 113 ⟶ 121:
This way if an article doesn't define the population parameter in its infobox the row won't be displayed.
 
For more complex fields with pre-formatedformatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. For instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'":
 
<pre>
Line 305 ⟶ 313:
| child = yes
| title = Second subsection
| label1= Label 2.1
| data1 = Data 2.1
}}
|belowstyle =
|below = Below text
}}
</pre>
Note, in the examples above, the child infobox is placed in a <code>data</code> field, not a <code>header</code> field. The title will be enclosed in {{tag|b}} bold tags, which can create a "double bolding effect" in some browsers if the child infobox is placed in a <code>header</code> field. To place the child infobox in a header field and avoid the double bolding effect, use
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox
| child = yes
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox
| child = yes
| label1= Label 2.1
| data1 = Data 2.1
}}
|belowstyle =
|below = Below text
}}
<pre style="overflow:auto">
{{Infobox
| title = Top level title
| header1 = First subsection
{{Infobox
| child = yes
| label1= Label 1.1
| data1 = Data 1.1
}}
| header2 = Second subsection
{{Infobox
| child = yes
| label1= Label 2.1
| data1 = Data 2.1
Line 314 ⟶ 359:
 
=== Full blank syntax ===
(Note: the template currently handles up to 8099 rows; only 20 are includedgiven herebelow since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.)
 
<pre style="overflow:auto;">
Line 403 ⟶ 448:
 
=== Porting to other MediaWikis ===
The infobox template requires the tidy extension to be installed, and may not work with other MediaWikis. theThe [[WPWikipedia:TRANWikiProject Transwiki]] has a version of Infobox that has been modified to work on other MediaWikis.
 
=== See also ===
* {{tl|infobox3cols}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Infobox templates| ]]
[[Category:Templates generating microformats]]
[[Category:Wikipedia metatemplates|Infobox]]
 
[[huals:SablonVorlage:Infobox]]
[[ar:قالب:قالب معلومات]]
[[be:Шаблон:Картка]]
[[be-x-old:Шаблён:Картка]]
[[bg:Шаблон:Infobox]]
[[bn:টেমপ্লেট:তথ্যছক]]
[[bs:Šablon:Infokutija]]
[[esca:Plantilla:FichaInfotaula]]
[[cs:Šablona:Infobox]]
[[csb:Szablóna:Infobox]]
[[cy:Nodyn:Gwybodlen3]]
[[da:Skabelon:Infoboks-en]]
[[de:Vorlage:Infobox]]
<!-- [[en:Template:Infobox]] -->
[[el:Πρότυπο:Πλαίσιο πληροφοριών]]
[[eten:MallTemplate:Infobox]]
[[es:Plantilla:Ficha]]
[[eo:Ŝablono:Informkesto]]
[[es:Plantilla:Ficha]]
[[itet:TemplateMall:Infobox]]
[[fa:الگو:دادان]]
[[fi:Malline:Tietolaatikko]]
[[fr:Modèle:Infobox]]
[[ga:Teimpléad:Bosca sonraí]]
[[mkgl:ШаблонModelo:Infobox]]
[[hsb:Předłoha:Infokašćik]]
[[idhu:TemplatSablon:Infobox]]
[[hy:Կաղապար:Տեղեկաքարտ]]
[[ia:Patrono:Infobox]]
[[osid:ШаблонTemplat:Infobox]]
[[it:Template:Infobox]]
[[is:Snið:Infobox]]
[[lvit:VeidneTemplate:Infobox]]
[[mk:Шаблон:Infobox]]
[[no:Mal:Infoboks]]
[[ja:Template:Infobox]]
[[hu:Sablon:Infobox]]
[[csb:Szablóna:Infobox]]
[[ko:틀:정보상자]]
[[ka:თარგი:ინფოდაფა]]
[[kk:Үлгі:Инфобокс]]
[[km:ទំព័រគំរូ:ប្រអប់​ព័ត៌មានប្រអប់ព័ត៌មាន]]
[[ko:틀:정보상자]]
[[ltg:Taiss:Infoskreine]]
[[lv:Veidne:Infobox]]
[[mhr:Кышкар:Аҥа]]
[[mk:Шаблон:Infobox]]
[[ms:Templat:Infobox]]
[[nn:Mal:Infoboks]]
[[no:Mal:Infoboks]]
[[os:Шаблон:Infobox]]
[[pt:Predefinição:Info]]
[[ro:Format:Infobox]]
[[ru:Шаблон:Карточка]]
[[si:සැකිල්ල:තොරතුරුකොටුව]]
[[sk:Šablóna:Infobox]]
[[sl:Predloga:Infopolje]]
[[sv:Mall:Infobox]]
[[th:แม่แบบ:กล่องข้อมูล]]
<!-- [[entpi:Template:InfoboxInfobok]] -->
[[tr:Şablon:Bilgi kutusu]]
[[uk:Шаблон:Картка]]
Line 454 ⟶ 515:
[[vi:Bản mẫu:Infobox]]
[[zh:Template:Infobox]]
}}</includeonly>
<noinclude>
[[Category:Teamplaid sa Bheurla]]
</noinclude>