Template:Navbox with columns/doc: Difference between revisions

m
7 revisions imported: Import from https://sims.wikia.com
sims>FrescoBot
m (Bot: fixing section wikilinks)
 
m (7 revisions imported: Import from https://sims.wikia.com)
 
(6 intermediate revisions by 2 users not shown)
Line 1:
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>A navigation box that presents its content in columns. Originally intended to provide a relatively straightforward means to align links prefixed by flag icons, e.g. in templates offering links to country articles.
{{Documentation subpage}}
{{Navbox suite}}
A navigation box that presents its content in columns. Originally intended to provide a relatively straightforward means to align links prefixed by flag icons, e.g. in templates offering links to country articles.
 
== Basic syntax ==
Line 16 ⟶ 14:
}}
</pre>
<div style="line-height:1.35em; font-size:90%;">* See [[Wikipedia:Em (typography)|Em (typography)]]. Using proportional units means the template should still be displayed correctly across a range of browser font-sizes. If ''colwidth'' not specified, a default 10em is used.</div>
 
== Parameters ==
=== Setup parameters ===
:;''name''<ref name="common">Parameters marked with a footnote '''<sup>[1]</sup>''' are parameters in common with the sister templates {{t1t|Navbox}} and {{t1t|Navbox with collapsible groups}}. A much more complete description of those parameters is available at {{t1t|Navbox}}.</ref>
::The name of the template. The name of this template, for example, is "Navbox with columns".
 
:;''state''<ref name="common"/>
::Possible values are <code>collapsed</code>, <code>uncollapsed</code>, <code>plain</code>, <code>off</code>, and the default <code>autocollapse</code>. See {{t1t|Navbox}} for more information.
 
:;''navbar''<ref name="common"/>
::Possible values are <code>plain</code>, <code>off</code>, and the default value of blank. See {{t1t|Navbox}} for more information.
 
:;''border''<ref name="common"/>
::Possible values are <code>child</code>, <code>none</code>, and the default value of blank. Set to <code>child</code> if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox. The parent navbox may be the list area of {{t1t|Navbox}}, a columns of another {{t1t|Navbox with columns}}, or a section of {{t1t|Navbox with collapsible groups}}. See {{t1t|Navbox}} for more information and examples.
 
===Basic data parameters===
Line 89 ⟶ 87:
===Columns parameters===
:;''colwidth''
::Width, preferably in a proportional unit such as '[[Wikipedia:Em (typography)|em]]', or as a percentage, used for each column whose width not specified by ''colNwidth'' below. Defaults to 10em. Examples:
:::<code>colwidth = 15em</code>
:::<code>colwidth = 25%</code>
Line 119 ⟶ 117:
 
===Additional groups/lists===
You may wish to add a few extra groups and/or lists below the columns. The following parameters are given to provide such functionality. See {{t1t|Navbox}} for a more complete description of how they work, and for more examples.
 
:;''group<sub>n</sub>''<ref name="common"/>
Line 146 ⟶ 144:
 
:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span>
::See {{t1t|Navbox}} for description.
 
== Examples ==
Line 168 ⟶ 166:
}}
</pre>
[[Wikipedia:Template:East Asia Summit (EAS)]]
{{Navbox with columns
|name = East Asia Summit (EAS)
|state = uncollapsed
|title = Member states of the [[East Asia Summit|East Asia Summit (EAS)]]
|width = 18.25em
|padding = 10em
 
|above = ''This is where the <nowiki>{{{above}}}</nowiki> parameter would appear.''
 
|col1 = {{AUS}}<br> {{BRU}}<br> {{flag|CHN|name=PR China}}<br> {{CAM}}
|col2 = {{IND}}<br> {{IDN}}<br> {{JPN}}<br> {{LAO}}
|col3 = {{MAS}}<br> {{MMR}}<br> {{NZL}}<br> {{PHI}}
|col4width = 17em
|col4 = {{SIN}}<br> {{KOR}}<br> {{THA}}<br> {{VIE}}
 
|below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}}
}}
 
===Example with percentage widths===
Line 198 ⟶ 180:
}}
</pre>
[[Wikipedia:Template:Plastics]]
{{Navbox with columns
| name = Plastics
| title = [[Plastic]]s
| state = uncollapsed
| cols = 3
| colwidth = 33%
| colstyle = text-align: center
| col1 = [[Polyethylene]] (PE)<br> [[Polyethylene terephthalate]] (PET or PETE)<br> [[Polyvinyl chloride]] (PVC)<br> [[Polyvinylidene chloride]] (PVDC)<br> [[Polylactic acid]] (PLA)
| col2 = [[Polypropylene]] (PP)<br> [[Polyamide]] (PA)<br> [[Polycarbonate]] (PC)<br> [[Polytetrafluoroethylene]] (PTFE)<br> [[Polyurethane]] (PU)
| col3 = [[Polystyrene]] (PS)<br> [[Polyester]]<br> [[Acrylonitrile butadiene styrene]] (ABS)<br> [[Acrylic glass|Polymethyl methacrylate]] (PMMA)<br> [[Polyoxymethylene]] (POM)
}}
 
 
===Example with col<sub>n</sub>header and col<sub>n</sub>footer===
The gray background for the columns is added for illustration only.
Line 312 ⟶ 282:
 
==Using child navboxes==
All three types of navbox templates, namely {{t1t|Navbox}}, {{t1t|Navbox with columns}}, and {{t1t|Navbox with collapsible groups}}, can be nested inside of one another using the <code>border</code> parameter (which is common to all three). For complex templates, it may be necessary to use nesting to achieve a desired look.
 
===Nesting Navbox with columns in itself===
This example shows how one can nest multiple {{t1t|Navbox with columns}} templates to get the right look. Edit this page to see the code. There is a main {{t1t|Navbox with columns}} and two additional {{t1t|Navbox with columns}} templates, with the "child" option set (see code).
{{Navbox with columns
|name = Navbox with columns/doc
Line 362 ⟶ 332:
 
===Nesting other Navbox forms===
This example shows {{t1t|Navbox}}, {{t1t|Navbox with collapsible groups}} and {{t1t|Navbox with columns}} all working together. Edit this page to see the code. Note that each of the child navboxes has the first parameter set to <code>child</code>.
{{Navbox with collapsible groups
|name = Navbox with collapsible groupsAspirations
|title= [[Aspiration (The Sims 2)|Aspirations]] in ''[[The Sims 2]]''
|title = Navbox, Navbox with columns, and Navbox with collapsible groups together
|groupstyle=text-align: center;
|selected = {{{1|}}}
|liststyle=font-size:75%;text-align: center;
 
|group1 = [[:Category:Scouting|ThePC Scoutingand Movement]]Mac
|list1= {{Navbox with columns|child
|abbr1 = movement
|colwidth = 16%
|list1 = [[Scouting]]{{·}}''[[Scouting for Boys]]''{{·}}[[Scout method]]{{·}}[[Scout Law]]{{·}}[[Scout Promise]]{{·}}[[Scout Motto]]{{·}}[[Wood Badge]]{{·}}[[Age groups in Scouting and Guiding]]{{·}}[[Cub Scout]]{{·}}[[Boy Scout]]{{·}}[[Rover Scout]]{{·}}[[Brownie (Girl Guides)|Brownie]]{{·}}[[Girl Guiding and Girl Scouting]]{{·}}[[Ranger (Girl Guide)]]{{·}}[[Jamboree (Scouting)|Jamboree]]{{·}}[[Scout Leader]]{{·}}[[World Organization of the Scout Movement|WOSM]]{{·}}[[World Association of Girl Guides and Girl Scouts|WAGGGS]]{{·}}[[Non-aligned Scouting and Scout-like organisations|Non-aligned organisations]]{{·}}[[Scouting controversy and conflict]]{{·}}[[Scouting in popular culture]]{{·}}[[List of Scouts]]{{·}}[[List of highest awards in Scouting]]
|col6width = 20%
|colstyle=text-align: center;
 
|col1= [[File:Growup.gif|link=Grow Up]]<br />[[Grow Up]]
|list2 = {{Navbox|child
|col2= [[File:Family.gif|link=Family (aspiration)]]<br />[[Family (aspiration)|Family]]
|title = [[French colonial empires|Former French colonies]] in [[Africa]] and the [[Indian Ocean]]
|col3= [[File:Knowledge.gif|link=Knowledge]] [[Knowledge]]
|titlestyle = background#
|col4= [[File:Romance.gif|link=Romance]]<br />[[Romance]]
|groupstyle = background:lavender;
|col5= [[File:Fortune.gif|link=Fortune]]<br />[[Fortune]]
|col6= [[File:Popularity.gif|link=Popularity]]<br />[[Popularity]]
}}
{{Navbox with columns|child
|colheaderstyle=text-align: center;background-color:#C0C0C0;
|colstyle=text-align: center;
 
|col1header = Removed aspirations
|group1 = [[Mahgreb]]
|col1= [[Power (aspiration)|Power]] · [[Aspiration (The Sims 2)#Defunct|Craft]]
|list1 = [[French rule in Algeria|Algeria]]{{·}} [[French Morocco|Morocco]]&nbsp;<small>([[Arguin|Arguin Island]])</small>{{·}} [[History of Tunisia|Tunisia]]
 
|col2header = ''[[The Sims 2: Nightlife|Nightlife]]''
|group2 = [[French West Africa]]
|col2 = {{Navbox with columns|child
|list2 = [[History of Côte d'Ivoire#French Period|Côte d'Ivoire]]{{·}} [[French Dahomey|Dahomey]]{{·}} [[French Sudan]]{{·}} [[French Guinea|Guinea]]{{·}} [[History of Mauritania#French colonization and post-colonial history|Mauritania]]{{·}} [[History of Niger#Colonization|Niger]]{{·}} [[History of Senegal|Senegal]]{{·}} [[French Upper Volta|Upper Volta]]
 
|colwidth = 50%
|group3 = Togo
|colstyle=text-align: center;
|list3 = [[French Togoland]]{{·}} [[James Island (The Gambia)|James Island]]
 
|col1= [[File:Pleasure.gif|link=Pleasure]] <br /> [[Pleasure]]
|group4 = [[French Equatorial Africa]]
|col2= [[File:Grilled cheese.gif|link=Grilled Cheese]] <br /> [[Grilled Cheese|Grilled Cheese]]
|list4 = [[Colonial Chad|Chad]]{{·}} [[History of Gabon|Gabon]]{{·}} [[History of the Republic of the Congo|Middle Congo]]{{·}} [[Oubangui-Chari]]
}}
}}
|list2= {{Navbox with columns|child
|title = Consoles and handhelds
|colstyle = font-size:75%;text-align:center;
|colheaderstyle= font-size:75%;text-align:center;background-color:#C0C0C0
 
|col1width = 30%
|group5 = [[Comoros]]
|col2width = 40%
|list5 = [[Anjouan]]{{·}} [[Grande Comore]]{{·}} [[Mohéli]]
|col3width = 30%
 
|col1header = [[The Sims 2 (console)|Console]] and<br>[[The Sims 2 Pets (console)|''Pets'' console]]
|group6 = Southern Africa
|col2header = [[The Sims 2 (GBA)|Game Boy Advance]]
|list6 = [[History of Djibouti#French interest|French Somaliland (Djibouti)]]{{·}} [[History of Madagascar#French control|Madagascar]]{{·}} [[Mauritius|Ile de France]]{{·}} [[Seychelles]]
|col3header = [[The Sims 2 (Nintendo DS)|Nintendo DS]]
 
|col1 = [[File:Creativity.png|link=Creativity (aspiration)]]<br />[[Creativity (aspiration)|Creativity]]
}}
 
|col2 = {{Navbox with columns|child
|group3 = [[Scouting in the United Kingdom]]
|colwidth = 33%
|abbr3 = Scouting
|colstyle = text-align:center;
|list3 = [[The Scout Association]]{{·}}[[Girlguiding UK]]{{·}}[[Beaver Scouts]]{{·}}[[Cub Section (UK)]]{{·}}[[Venture Scout]]{{·}}[[Explorer Scouts]]{{·}}[[Brownie (Girl Guides)]]{{·}}[[Ranger (Girl Guide)]]{{·}}[[Rainbow (Girl Guides)]]{{·}}[[Scout Network]]{{·}}[[Chief Scout (United Kingdom)]]{{·}}[[Scout Counties]]{{·}}[[Scout District]]{{·}}[[Scout Section (UK)]]{{·}}[[Scout Activity Centre]]{{·}}[[Young Leaders (The Scout Association)|Young Leaders]]
 
|col1 = [[File:Friendly.png|45px|link=Friendly (aspiration)]]<br />[[Friendly (aspiration)|Friendly]]
|list4 = {{Navbox with columns|child
|col2 = [[File:Romantic.png|45px|link=Romantic]]<br />[[Romantic]]
|title = Navbox with columns nested in itself
|col3= [[File:Intimidating.png|45px|link=Intimidating]]<br />[[Intimidating]]
|colstyle = text-align:center;
}}
 
|col3 = [[File:Party.png|46px|link=Party (aspiration)]]<br />[[Party (aspiration)|Party]]
|col1width = 33%
|col2width = 17%
|col3width = 33%
|col4width = 17%
 
}}
|col1header = Col1Header
|col2header = Col2Header
|col3header = Col3Header
|col4header = Col4Header
 
|col1 = {{Navbox with columns|child
|colwidth = 50%
|colstyle = text-align:center;
 
|col1header = Col1.1Header
|col2header = Col1.2Header
 
|col1 = Col1.1
|col2 = Col1.2
}}
 
|col2 = Col2
 
|col3 = {{Navbox with columns|child
|colwidth = 33%
|colstyle = text-align:center;
 
|col1header = Col3.1Header
|col2header = Col3.2Header
|col3header = Col3.3Header
 
|col1 = Col3.1
|col2 = Col3.2
|col3 = Col3.3
}}
 
|col4 = Col4
}}
 
== See also ==
}}
* {{t|Navbox}} &ndash; Allows groups/lists instead of columns
* {{tl|Navbox subgroup}}
* {{t|Navbox with collapsible groups}} &ndash; Another variation.
 
==Footnote==
<references/>
 
== See also ==
* {{t1|Navbox}} &ndash; Allows groups/lists instead of columns
* {{tl|Navbox subgroup long}} &ndash; expanded version of {{tl|Navbox subgroup}} allowing up to 38 subgroups
* {{t1|Navbox with collapsible groups}} &ndash; Another variation.
 
{{Navigational templates}}
 
 
<includeonly>
<!--Categories-->
[[Category:Navbox (navigational)Navigation templates| ]]
 
<!--Other languages-->
 
[[ar:قالب:Navbox with columns]]
[[cs:Šablona:Navbox se sloupci]]
[[eo:Ŝablono:Navigilo kun kolumnoj]]
[[fr:Modèle:Méta palette de navigation avec colonnes]]
[[ko:틀:안내/다단]]
[[hsb:Předłoha:Nawitabela ze špaltami]]
[[ja:Template:Navbox with columns]]
[[ku:Şablon:Navbox with columns]]
[[mk:Шаблон:Navbox with columns]]
[[pl:Szablon:Navbox z kolumnami]]
[[pt:Predefinição:Navbox with columns]]
[[ro:Format:Casetă de navigare cu coloane]]
[[ru:Шаблон:Навигационная таблица с колонками]]
[[sl:Predloga:Navigacija s stolpci]]
[[sv:Mall:Navbox with columns]]
[[uk:Шаблон:Navbox with columns]]
[[vi:Tiêu bản:Navbox with columns]]
[[zh:Template:Navbox with columns]]
</includeonly>