Difference between revisions of "Template:Navbox"

From comp.tf
Jump to navigation Jump to search
m
m
Line 6: Line 6:
 
{{!}} class="group" {{!}} '''{{{group1}}}'''
 
{{!}} class="group" {{!}} '''{{{group1}}}'''
 
{{#if:{{{subgroup1|}}} |
 
{{#if:{{{subgroup1|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup1|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup1|}}}''' }}
 
{{!}} class="row1" colspan={{#if:{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list1}}}
 
{{!}} class="row1" colspan={{#if:{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list1}}}
 
|}}
 
|}}
Line 13: Line 13:
 
{{!}} class="group" {{!}} '''{{{group2}}}'''
 
{{!}} class="group" {{!}} '''{{{group2}}}'''
 
{{#if:{{{subgroup2|}}} |
 
{{#if:{{{subgroup2|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup2|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup2|}}}''' }}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list2}}}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list2}}}
 
|}}
 
|}}
Line 20: Line 20:
 
{{!}} class="group" {{!}} '''{{{group3}}}'''
 
{{!}} class="group" {{!}} '''{{{group3}}}'''
 
{{#if:{{{subgroup3|}}} |
 
{{#if:{{{subgroup3|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup3|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup3|}}}''' }}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list3}}}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list3}}}
 
|}}
 
|}}
Line 27: Line 27:
 
{{!}} class="group" {{!}} '''{{{group4}}}'''
 
{{!}} class="group" {{!}} '''{{{group4}}}'''
 
{{#if:{{{subgroup4|}}} |
 
{{#if:{{{subgroup4|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup4|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup4|}}}''' }}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list4}}}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list4}}}
 
|}}
 
|}}
Line 34: Line 34:
 
{{!}} class="group" {{!}} '''{{{group5}}}'''
 
{{!}} class="group" {{!}} '''{{{group5}}}'''
 
{{#if:{{{subgroup5|}}} |
 
{{#if:{{{subgroup5|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup5|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup5|}}}''' }}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list5}}}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list5}}}
 
|}}
 
|}}
Line 41: Line 41:
 
{{!}} class="group" {{!}} '''{{{group6}}}'''
 
{{!}} class="group" {{!}} '''{{{group6}}}'''
 
{{#if:{{{subgroup6|}}} |
 
{{#if:{{{subgroup6|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup6|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup6|}}}''' }}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list6}}}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list6}}}
 
|}}
 
|}}
Line 48: Line 48:
 
{{!}} class="group" {{!}} '''{{{group7}}}'''
 
{{!}} class="group" {{!}} '''{{{group7}}}'''
 
{{#if:{{{subgroup7|}}} |
 
{{#if:{{{subgroup7|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup7|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup7|}}}''' }}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list7}}}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup8|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list7}}}
 
|}}
 
|}}
Line 55: Line 55:
 
{{!}} class="group" {{!}} '''{{{group8}}}'''
 
{{!}} class="group" {{!}} '''{{{group8}}}'''
 
{{#if:{{{subgroup8|}}} |
 
{{#if:{{{subgroup8|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup8|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup8|}}}''' }}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list8}}}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup9|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list8}}}
 
|}}
 
|}}
Line 62: Line 62:
 
{{!}} class="group" {{!}} '''{{{group9}}}'''
 
{{!}} class="group" {{!}} '''{{{group9}}}'''
 
{{#if:{{{subgroup9|}}} |
 
{{#if:{{{subgroup9|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup9|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup9|}}}''' }}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list9}}}
 
{{!}} class="row1" colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup10|}}}|2|1}} {{!}} {{{list9}}}
 
|}}
 
|}}
Line 69: Line 69:
 
{{!}} class="group" {{!}} '''{{{group10}}}'''
 
{{!}} class="group" {{!}} '''{{{group10}}}'''
 
{{#if:{{{subgroup10|}}} |
 
{{#if:{{{subgroup10|}}} |
{{!}} style="background-color:#f2f2f2; width:20em" {{!}} '''{{{subgroup10|}}}''' }}
+
{{!}} style="background-color:#e9e9e9;" {{!}} '''{{{subgroup10|}}}''' }}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}|2|1}} {{!}} {{{list10}}}
 
{{!}} colspan={{#if:{{{subgroup1|}}}{{{subgroup2|}}}{{{subgroup3|}}}{{{subgroup4|}}}{{{subgroup5|}}}{{{subgroup6|}}}{{{subgroup7|}}}{{{subgroup8|}}}{{{subgroup9|}}}|2|1}} {{!}} {{{list10}}}
 
|}}
 
|}}

Revision as of 21:25, 26 April 2016

Usage

This template creates a navigation box, same as the ones on other wikis. This template should not be used directly on pages, but it should be used to create other templates. These are linked on pages to prevent redundancy.

Syntax:

{{Navbox
| templatename = Maps navbox //This is the name of the sub-template page you'll be creating, without the Template: prefix.
| collapsed = true //Omitting this parameter completely will leave the navbox uncollapsed.
| title = [[Maplist|<span style="color: #fff">List of maps played in competitive TF2</span>]]
| group1 = [[5CP]]
| list1 = [[cp_badlands|Badlands]] · [[cp_granary|Granary]]
...
}}

will yield