Editing Template:Navbox with columns/doc
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | <includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | ||
− | + | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | |
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. | 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. | ||
Line 6: | Line 6: | ||
Only required parameters and ''colwidth'' included. | Only required parameters and ''colwidth'' included. | ||
− | <pre style="overflow:auto;"> | + | <pre style="font-size:95%; overflow:auto;"> |
{{Navbox with columns | {{Navbox with columns | ||
|name = {{subst:PAGENAME}} | |name = {{subst:PAGENAME}} | ||
Line 19: | Line 19: | ||
== Parameters == | == Parameters == | ||
− | Required parameters in '''bold'''. Parameters marked with a cross'''<sup>†</sup>''' are parameters in common with the sister | + | Required parameters in '''bold'''. Parameters marked with a cross'''<sup>†</sup>''' are parameters in common with the sister template {{t1|Navbox}}. A much more complete description of those parameters is available there. |
===Setup parameters=== | ===Setup parameters=== | ||
:;name<sup>†</sup> | :;name<sup>†</sup> | ||
− | ::The name of the template. The name of this template, for example, is " | + | ::The name of the template. The name of this template, for example, is "Navigation with columns". |
:;state<sup>†</sup> | :;state<sup>†</sup> | ||
Line 32: | Line 32: | ||
:;''border''<sup>†</sup> | :;''border''<sup>†</sup> | ||
− | ::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 {{t1|Navbox}}, a columns of another {{t1|Navbox with columns}}, or a section of {{t1|Navbox with collapsible | + | ::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 {{t1|Navbox}}, a columns of another {{t1|Navbox with columns}}, or a section of {{t1|Navbox with collapsible sections}}. See {{t1|Navbox}} for more information and examples. |
===Basic data parameters=== | ===Basic data parameters=== | ||
Line 62: | Line 62: | ||
:;''basestyle''<sup>†</sup> | :;''basestyle''<sup>†</sup> | ||
− | ::CSS style/s to apply to the ''title'', ''above'', | + | ::CSS style/s to apply to the ''title'', ''above'', ''below'', and ''group'' parameters, all at the same time. |
:;''imagestyle''<sup>†</sup> | :;''imagestyle''<sup>†</sup> | ||
Line 70: | Line 70: | ||
::CSS style/s to apply to the ''imageleft'' parameter | ::CSS style/s to apply to the ''imageleft'' parameter | ||
− | :;'' | + | :;''colsstyle'' |
::CSS style/s to apply across all columns; if used, usually <code>background:''color''</code> per ''titlestyle'' above. | ::CSS style/s to apply across all columns; if used, usually <code>background:''color''</code> per ''titlestyle'' above. | ||
Line 82: | Line 82: | ||
:;''colheaderstyle'' | :;''colheaderstyle'' | ||
::CSS style/s to apply to all column headers. | ::CSS style/s to apply to all column headers. | ||
+ | |||
+ | :;''colheader2style'' | ||
+ | ::CSS style/s to apply to all second level columns headers. | ||
:;''col<sub>n</sub>headerstyle'' | :;''col<sub>n</sub>headerstyle'' | ||
::CSS style/s to apply to the n<sup>th</sup> column header. | ::CSS style/s to apply to the n<sup>th</sup> column header. | ||
− | :;''col<sub>n</sub> | + | :;''col<sub>n</sub>headerstyle2'' |
+ | ::CSS style/s to apply to the n<sup>th</sup> second level column header. | ||
+ | |||
+ | :;''col<sub>n</sub>footer'' | ||
::CSS style/s to apply to the n<sup>th</sup> column footer cell. | ::CSS style/s to apply to the n<sup>th</sup> column footer cell. | ||
Line 94: | Line 100: | ||
:::<code>colwidth = 15em</code> | :::<code>colwidth = 15em</code> | ||
:::<code>colwidth = 25%</code> | :::<code>colwidth = 25%</code> | ||
− | |||
− | |||
− | |||
− | |||
:;''padding'' | :;''padding'' | ||
Line 106: | Line 108: | ||
:;'''''col<sub>n</sub>''''' | :;'''''col<sub>n</sub>''''' | ||
− | ::The content of the n<sup>th</sup> column. | + | ::The content of the n<sup>th</sup> column. <code>col1</code> is required. There can be a maximum of 12 columns. |
:;''col<sub>n</sub>header'' | :;''col<sub>n</sub>header'' | ||
− | ::A header cell for the n<sup>th</sup> column that appears above the column. | + | ::A header cell for the n<sup>th</sup> column that appears above the column. |
+ | |||
+ | :;''col<sub>n</sub>header2 | ||
+ | ::A second header cell for the n<sup>th</sup> column that appears above the column, but below the first header cell. | ||
:;''col<sub>n</sub>footer | :;''col<sub>n</sub>footer | ||
::A footer cell that appears below the n<sup>th</sup> column. | ::A footer cell that appears below the n<sup>th</sup> column. | ||
+ | ===Customization parameters for the column headers and footer=== | ||
:;''col<sub>n</sub>headercolspan | :;''col<sub>n</sub>headercolspan | ||
::A number specifying how many columns the n<sup>th</sup> column header should span. It defaults to 1. If it is greater than one, then do not specify column headers that it covers. For example, if <code>col1headercolspan = 3</code>, then leave <code>col2header</code> and <code>col3header</code> blank. | ::A number specifying how many columns the n<sup>th</sup> column header should span. It defaults to 1. If it is greater than one, then do not specify column headers that it covers. For example, if <code>col1headercolspan = 3</code>, then leave <code>col2header</code> and <code>col3header</code> blank. | ||
+ | |||
+ | :;''col<sub>n</sub>headerrowspan | ||
+ | ::Set to either 1 or 2; defaults to 1. The number of rows that the n<sup>th</sup> column header should span. Only set to two if you intend to set colNheader2 for the remaining columns. | ||
+ | |||
+ | :;''col<sub>n</sub>header2colspan | ||
+ | ::A number specifying how many columns the n<sup>th</sup> second level column header should span. It defaults to 1. If it is greater than one, then do not specify column headers that it covers. For example, if <code>col1header2colspan = 3</code>, then leave <code>col2header2</code> and <code>col3header3</code> blank. | ||
:;''col<sub>n</sub>footercolspan | :;''col<sub>n</sub>footercolspan | ||
− | ::A number specifying how many columns the n<sup>th</sup> column footer should span. It defaults to 1. If it is greater than one, then do not specify column footers that it covers. For example, if <code> | + | ::A number specifying how many columns the n<sup>th</sup> column footer should span. It defaults to 1. If it is greater than one, then do not specify column footers that it covers. For example, if <code>col1footerspan = 3</code>, then leave <code>col2footer</code> and <code>col3footer</code> blank. |
− | ===Additional lists=== | + | ===Additional groups/lists=== |
You may wish to add a few extra lists below the columns. The following parameters are given to provide such functionality. See {{t1|Navbox}} for a more complete description of how they work, and for more examples. Groups are not allowed. | You may wish to add a few extra lists below the columns. The following parameters are given to provide such functionality. See {{t1|Navbox}} for a more complete description of how they work, and for more examples. Groups are not allowed. | ||
− | :;''list<sub>n</sub>'' | + | :;''list<sub>n</sub>'' |
::Allows up to 6 additional lists below the columns. | ::Allows up to 6 additional lists below the columns. | ||
− | :;''liststyle'' | + | :;''liststyle'' |
::The general CSS style/s for the lists. | ::The general CSS style/s for the lists. | ||
− | :;''list<sub>n</sub>style'' | + | :;''list<sub>n</sub>style'' |
::CSS style/s for the n<sup>th</sup> list parameter. | ::CSS style/s for the n<sup>th</sup> list parameter. | ||
− | |||
− | |||
== Examples == | == Examples == | ||
Line 209: | Line 219: | ||
|colwidth = 25% | |colwidth = 25% | ||
− | |col1header = | + | |col1header = Col1Header |
− | |col2header = | + | |col2header = Col2Header |
− | |col3header = | + | |col3header = Col3Header |
− | |col4header = | + | |col4header = Col4Header |
− | |col1 = | + | |col1 = Col1 |
− | |col2 = | + | |col2 = Col2 |
− | |col3 = | + | |col3 = Col3 |
− | |col4 = | + | |col4 = Col4 |
− | |col1footer = | + | |col1footer = Col1Footer |
− | |col2footer = | + | |col2footer = Col2Footer |
− | |col3footer = | + | |col3footer = Col3Footer |
− | |col4footer = | + | |col4footer = Col4Footer |
}} | }} | ||
− | === | + | |
− | The gray background for the columns is added for illustration only. | + | ===Advanced col<sub>n</sub>header example=== |
+ | This example shows how to use the col<sub>n</sub>headerrowspan and col<sub>n</sub>headercolspan features to make the headers look the way you want. This one uses both header levels. The gray background for the columns is added for illustration only. | ||
{{Navbox with columns | {{Navbox with columns | ||
|name = Navbox with columns/doc | |name = Navbox with columns/doc | ||
|state = uncollapsed | |state = uncollapsed | ||
− | |title = | + | |title = Row/colspan tests |
|colstyle = text-align:center;background:silver; | |colstyle = text-align:center;background:silver; | ||
+ | |colwidth = 15% | ||
+ | |col1width = 12% | ||
+ | |col2width = 13% | ||
− | | | + | |col1headercolspan = 2 |
− | | | + | |col3headerrowspan = 2 |
− | | | + | |col4headercolspan = 3 |
− | | | + | |col7headerrowspan = 2 |
− | | | + | |col1header = Col1Header |
− | | | + | |col1header2 = Col1Header2 |
+ | |col2header2 = Col2Header2 | ||
+ | |col3header = Col3Header | ||
+ | |col4header = Col4Header | ||
+ | |col4header2 = Col4Header2 | ||
+ | |col5header2 = Col5Header2 | ||
+ | |col6header2 = Col6Header2 | ||
+ | |col7header = Col7Header | ||
− | |col1 = | + | |col1 = Col1 |
− | |col2 = | + | |col2 = Col2 |
− | |col3 = | + | |col3 = Col3 |
− | |col4 = | + | |col4 = Col4 |
− | |col5 = | + | |col5 = Col5 |
− | |col6 = | + | |col6 = Col6 |
− | |col7 = | + | |col7 = Col7 |
}} | }} | ||
+ | |||
==Using child navboxes== | ==Using child navboxes== | ||
− | All three types of navbox templates, namely {{t1|Navbox}}, {{t1|Navbox with columns}}, and {{t1|Navbox with collapsible | + | All three types of navbox templates, namely {{t1|Navbox}}, {{t1|Navbox with columns}}, and {{t1|Navbox with collapsible sections}}, 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=== | ===Nesting Navbox with columns in itself=== | ||
Line 303: | Line 325: | ||
===Nesting other Navbox forms=== | ===Nesting other Navbox forms=== | ||
− | This example shows {{t1|Navbox}}, {{t1|Navbox with collapsible | + | This example shows {{t1|Navbox}}, {{t1|Navbox with collapsible sections}} and {{t1|Navbox with columns}} all working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to <code>child</code> |
− | {{Navbox with collapsible | + | {{User:CapitalR/Navbox with collapsible sections |
− | |name = Navbox with collapsible | + | |name = Navbox with collapsible sections |
− | |title = Navbox, Navbox with columns, and Navbox with collapsible | + | |title = Navbox, Navbox with columns, and Navbox with collapsible sections together |
|selected = {{{1|}}} | |selected = {{{1|}}} | ||
− | | | + | |section1header = [[:Category:Scouting|The Scouting Movement]] |
− | | | + | |section1abbr = movement |
− | | | + | |section1content = [[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]] |
− | | | + | |section2content = {{Navbox|child |
|title = [[French colonial empires|Former French colonies]] in [[Africa]] and the [[Indian Ocean]] | |title = [[French colonial empires|Former French colonies]] in [[Africa]] and the [[Indian Ocean]] | ||
|titlestyle = background# | |titlestyle = background# | ||
Line 338: | Line 360: | ||
}} | }} | ||
− | | | + | |section3header = [[:Category:Scouting in the United Kingdom|Scouting in the United Kingdom]] |
− | | | + | |section3abbr = Scouting |
− | | | + | |section3content = [[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]] |
− | | | + | |section4content = {{Navbox with columns|child |
|title = Navbox with columns nested in itself | |title = Navbox with columns nested in itself | ||
|colstyle = text-align:center; | |colstyle = text-align:center; | ||
Line 389: | Line 411: | ||
== See also == | == See also == | ||
* {{t1|Navbox}} – Allows groups/lists instead of columns | * {{t1|Navbox}} – Allows groups/lists instead of columns | ||
− | * {{t1|Navbox with collapsible | + | * {{t1|Navbox with collapsible sections}} – Another variation. |
{{Navigational templates}} | {{Navigational templates}} | ||
Line 399: | Line 421: | ||
<!--Other languages--> | <!--Other languages--> | ||
− | |||
[[ja:Template:Navbox with columns]] | [[ja:Template:Navbox with columns]] | ||
[[mk:Шаблон:Navbox with columns]] | [[mk:Шаблон:Navbox with columns]] | ||
− | |||
[[sl:Predloga:Navigacija s stolpci]] | [[sl:Predloga:Navigacija s stolpci]] | ||
− | |||
</includeonly> | </includeonly> |