Difference between revisions of "Template:Navbox"

From comp.tf
Jump to navigation Jump to search
(Adjusted group width property)
(Undo revision 2573 by Atlas (talk))
Line 4: Line 4:
 
|-
 
|-
 
{{#if:{{{group1|}}} |
 
{{#if:{{{group1|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group1}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group1}}}'''
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list1}}}
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list1}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group2|}}} |
 
{{#if:{{{group2|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group2}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group2}}}'''
 
{{!}} {{{list2}}}
 
{{!}} {{{list2}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group3|}}} |
 
{{#if:{{{group3|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group3}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group3}}}'''
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list3}}}
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list3}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group4|}}} |
 
{{#if:{{{group4|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group4}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group4}}}'''
 
{{!}} {{{list4}}}
 
{{!}} {{{list4}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group5|}}} |
 
{{#if:{{{group5|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group5}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group5}}}'''
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list5}}}
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list5}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group6|}}} |
 
{{#if:{{{group6|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group6}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group6}}}'''
 
{{!}} {{{list6}}}
 
{{!}} {{{list6}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group7|}}} |
 
{{#if:{{{group7|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group7}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group7}}}'''
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list7}}}
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list7}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group8|}}} |
 
{{#if:{{{group8|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group8}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group8}}}'''
 
{{!}} {{{list8}}}
 
{{!}} {{{list8}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group9|}}} |
 
{{#if:{{{group9|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group9}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group9}}}'''
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list9}}}
 
{{!}} style="background: #fdfdfd;" {{!}} {{{list9}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group10|}}} |
 
{{#if:{{{group10|}}} |
{{!}} style="min-width: 8em; max-width: 12em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group10}}}'''
+
{{!}} style="width: 8em; text-align: right; background: #ddddff; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group10}}}'''
 
{{!}} {{{list10}}}
 
{{!}} {{{list10}}}
 
|}}
 
|}}

Revision as of 15:44, 5 July 2013

{{{title}}}

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|List of maps played in competitive TF2]]
| group1 = [[5CP]]
| list1 = [[cp_badlands|Badlands]] · [[cp_granary|Granary]]
...
}}

will yield

v · d · eList of maps played in competitive TF2
5CP Badlands · Granary