Difference between revisions of "Template:Navbox"

From comp.tf
Jump to navigation Jump to search
(Categorizing)
m
Line 5: Line 5:
 
{{#if:{{{group1|}}} |
 
{{#if:{{{group1|}}} |
 
{{!}} class="group" {{!}} '''{{{group1}}}'''
 
{{!}} class="group" {{!}} '''{{{group1}}}'''
 +
{{#if:{{{subgroup1|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup1|}}}''' }}
 
{{!}} class="row1" {{!}} {{{list1}}}
 
{{!}} class="row1" {{!}} {{{list1}}}
 
|}}
 
|}}
Line 10: Line 12:
 
{{#if:{{{group2|}}} |
 
{{#if:{{{group2|}}} |
 
{{!}} class="group" {{!}} '''{{{group2}}}'''
 
{{!}} class="group" {{!}} '''{{{group2}}}'''
 +
{{#if:{{{subgroup2|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup2|}}}''' }}
 
{{!}} {{{list2}}}
 
{{!}} {{{list2}}}
 
|}}
 
|}}
Line 15: Line 19:
 
{{#if:{{{group3|}}} |
 
{{#if:{{{group3|}}} |
 
{{!}} class="group" {{!}} '''{{{group3}}}'''
 
{{!}} class="group" {{!}} '''{{{group3}}}'''
 +
{{#if:{{{subgroup3|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup3|}}}''' }}
 
{{!}} class="row1" {{!}} {{{list3}}}
 
{{!}} class="row1" {{!}} {{{list3}}}
 
|}}
 
|}}
Line 20: Line 26:
 
{{#if:{{{group4|}}} |
 
{{#if:{{{group4|}}} |
 
{{!}} class="group" {{!}} '''{{{group4}}}'''
 
{{!}} class="group" {{!}} '''{{{group4}}}'''
 +
{{#if:{{{subgroup4|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup4|}}}''' }}
 
{{!}} {{{list4}}}
 
{{!}} {{{list4}}}
 
|}}
 
|}}
Line 25: Line 33:
 
{{#if:{{{group5|}}} |
 
{{#if:{{{group5|}}} |
 
{{!}} class="group" {{!}} '''{{{group5}}}'''
 
{{!}} class="group" {{!}} '''{{{group5}}}'''
 +
{{#if:{{{subgroup5|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup5|}}}''' }}
 
{{!}} class="row1" {{!}} {{{list5}}}
 
{{!}} class="row1" {{!}} {{{list5}}}
 
|}}
 
|}}
Line 30: Line 40:
 
{{#if:{{{group6|}}} |
 
{{#if:{{{group6|}}} |
 
{{!}} class="group" {{!}} '''{{{group6}}}'''
 
{{!}} class="group" {{!}} '''{{{group6}}}'''
 +
{{#if:{{{subgroup6|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup6|}}}''' }}
 
{{!}} {{{list6}}}
 
{{!}} {{{list6}}}
 
|}}
 
|}}
Line 35: Line 47:
 
{{#if:{{{group7|}}} |
 
{{#if:{{{group7|}}} |
 
{{!}} class="group" {{!}} '''{{{group7}}}'''
 
{{!}} class="group" {{!}} '''{{{group7}}}'''
 +
{{#if:{{{subgroup7|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup7|}}}''' }}
 
{{!}} class="row1" {{!}} {{{list7}}}
 
{{!}} class="row1" {{!}} {{{list7}}}
 
|}}
 
|}}
Line 40: Line 54:
 
{{#if:{{{group8|}}} |
 
{{#if:{{{group8|}}} |
 
{{!}} class="group" {{!}} '''{{{group8}}}'''
 
{{!}} class="group" {{!}} '''{{{group8}}}'''
 +
{{#if:{{{subgroup8|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup8|}}}''' }}
 
{{!}} {{{list8}}}
 
{{!}} {{{list8}}}
 
|}}
 
|}}
Line 45: Line 61:
 
{{#if:{{{group9|}}} |
 
{{#if:{{{group9|}}} |
 
{{!}} class="group" {{!}} '''{{{group9}}}'''
 
{{!}} class="group" {{!}} '''{{{group9}}}'''
 +
{{#if:{{{subgroup9|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup9|}}}''' }}
 
{{!}} class="row1" {{!}} {{{list9}}}
 
{{!}} class="row1" {{!}} {{{list9}}}
 
|}}
 
|}}
Line 50: Line 68:
 
{{#if:{{{group10|}}} |
 
{{#if:{{{group10|}}} |
 
{{!}} class="group" {{!}} '''{{{group10}}}'''
 
{{!}} class="group" {{!}} '''{{{group10}}}'''
 +
{{#if:{{{subgroup10|}}} |
 +
{{!}} style="background-color:#f2f2f2;" {{!}} '''{{{subgroup10|}}}''' }}
 
{{!}} {{{list10}}}
 
{{!}} {{{list10}}}
 
|}}
 
|}}

Revision as of 21:00, 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