Template:Navbox with columns

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
[edit] [purge] Template-info.svg Template documentation

Description

This is a vertically-oriented {{Navbox}}. There are even more parameters to this complex template than regular {{Navbox}}, and the template can be nested inside itself.

Usage

|name= is obligatory and must equal the template name without prefix; |title= and |listclass=plainlist should be included in almost every template once. Using |colnheader= and |coln= will give you a basic list.

Whereas {{Navbox}} uses |listclass=hlist (interpunct separates horizontal items), vertical lists usually use |listclass=plainlist (no leading bullets).

Basic

{{Navbox with columns
| name = {{subst:PAGENAME}}
| title = 
| listclass = plainlist
| colwidth = <!-- Applies to all columns. Can be e.g. 20em or 10% -->
| col1header = 
| col1 = 
| col2header =
| col2 = 
}}

Layout

Examples

Example 1

In this example we'll list the Earth's continents with a pointer to relevant UnNews and Undictionary entries.

We don't need to enclose our items in a div because we aren't needing sub-items.

{{Navbox with columns
| name = Navbox with columns/doc
| listclass = plainlist
| title = [[Continent]]s
| colwidth = 14%
| colstyle = text-align:center;

| col1header = [[Africa]]
| col1 = 
* [[UnNews:Africa|UnNews]]
| col2header = [[Antarctica]]
| col2 = 
* [[UnNews:Antarctica|UnNews]]
| col3header = [[Asia]]
| col3 = 
* [[UnNews:Asia|UnNews]]
| col4header = [[Australia]]
| col4 = 
* [[UnNews:Australia|UnNews]]
* [[Undictionary:Australia|Undictionary]]
| col5header = [[Europe]]
| col5 = 
* [[UnNews:Europe|UnNews]]
| col6header = [[North America]]
| col6 = 
* [[UnNews:North America|UnNews]]
| col7header = [[South America]]
| col7 = 
* [[UnNews:South America|UnNews]]
}}

Example 2

All 32 teams for the 2021 NHL.

{{Navbox with columns
| name = Navbox with columns/doc
| listclass = plainlist
| title = National Hockey League
| colwidth = 25%
| colstyle = text-align:center;

| col1headerstyle = background-color:#FCC;
| col1header = Pacific Division
| col1style = background-color:#FCC;
| col1 = 
* Anaheim Ducks
* Calgary Flames
* Edmonton Oilers
* Los Angeles Kings
* San Jose Sharks
* Seattle Kraken
* Vancouver Canucks
* Vegas Golden Knights
| col2headerstyle = background-color:#FCC;
| col2header = Central Division
| col2style = background-color:#FCC;
| col2 = 
* Arizona Coyotes
* Chicago Blackhawks
* Colorado Avalanche
* Dallas Stars
* Minnesota Wild
* Nashville Predators
* St. Louis Blues
* Winnipeg Jets
| col3headerstyle = background-color:#D0E7FF;
| col3header = Atlantic Division
| col3style = background-color:#D0E7FF;
| col3 = 
* Atlantic
* Boston Bruins
* Buffalo Sabres
* Detroit Red Wings
* Florida Panthers
* Montreal Canadiens
* Ottawa Senators
* Tampa Bay Lightning
* Toronto Maple Leafs
| col4headerstyle = background-color:#D0E7FF;
| col4header = Metropolitan Division
| col4style = background-color:#D0E7FF;
| col4 = 
* Carolina Hurricanes
* Columbus Blue Jackets
* New Jersey Devils
* New York Islanders
* New York Rangers
* Philadelphia Flyers
* Pittsburgh Penguins
* Washington Capitals
}}

Tips

  • The default for |colwidth= is 10em. If equal-width columns are desired, divide 100% by the number of columns. For seven columns, 100% ÷ 7 ≈ 14%, so use |colwidth=14%
  • Columns and lists share the same CSS class: either |listclass=plainlist or |listclass=hlist. To make the columns .plainlist but the groups-and-lists .hlist, the template can be nested with {{Navbox}} as the "child template". For instance:
Markup
{{Navbox with columns
| name = Navbox with columns/doc
| listclass = plainlist
| title = National Hockey League
| colwidth = 25%
| colstyle = text-align:center;

| col1headerstyle = background-color:#FCC;
| col1header = Pacific Division
| col1style = background-color:#FCC;
| col1 = 
* Anaheim Ducks
* Calgary Flames
* Edmonton Oilers
* Los Angeles Kings
* San Jose Sharks
* Seattle Kraken
* Vancouver Canucks
* Vegas Golden Knights
| col2headerstyle = background-color:#FCC;
| col2header = Central Division
| col2style = background-color:#FCC;
| col2 = 
* Arizona Coyotes
* Chicago Blackhawks
* Colorado Avalanche
* Dallas Stars
* Minnesota Wild
* Nashville Predators
* St. Louis Blues
* Winnipeg Jets
| col3headerstyle = background-color:#D0E7FF;
| col3header = Atlantic Division
| col3style = background-color:#D0E7FF;
| col3 = 
* Atlantic
* Boston Bruins
* Buffalo Sabres
* Detroit Red Wings
* Florida Panthers
* Montreal Canadiens
* Ottawa Senators
* Tampa Bay Lightning
* Toronto Maple Leafs
| col4headerstyle = background-color:#D0E7FF;
| col4header = Metropolitan Division
| col4style = background-color:#D0E7FF;
| col4 = 
* Carolina Hurricanes
* Columbus Blue Jackets
* New Jersey Devils
* New York Islanders
* New York Rangers
* Philadelphia Flyers
* Pittsburgh Penguins
* Washington Capitals
| list1 = {{Navbox|child
| state = plain
| listclass = hlist
| list1 = <div>
* [[NHL]]
* [[Stanley Cup]]
</div>
}}
}}
Example

History

Taken from wikipedia:Template:Navbox with columns. #Layout is taken from there too.