Difference between revisions of "Template:Navbox"

From comp.tf
Jump to navigation Jump to search
Line 1: Line 1:
 
{| class="mw-collapsible {{#if:{{{collapsed|}}} | mw-collapsed |}}" style="font-size: 11px; background: #f9f9f9; border: 1px solid #ccc; width: 100%;"
 
{| class="mw-collapsible {{#if:{{{collapsed|}}} | mw-collapsed |}}" style="font-size: 11px; background: #f9f9f9; border: 1px solid #ccc; width: 100%;"
 
|-
 
|-
! colspan=2 style="background: #1c1c1c; font-size: 12px;" | {{#if:{{{templatename|}}}|<span style="float: left; margin-left: 5px; font-size: 9px; font-weight: normal; color: #fff; ">[[Template:{{{templatename}}}|v]] &middot; [[Template talk:{{{templatename}}}|d]] &middot; <span class="plainlinks">[{{fullurl:Template:{{{templatename}}}|action=edit}} e]</span></span>|}}<span style="color: #fff">{{{title}}}</span>
+
! colspan=2 style="background: #1c1c1c; font-size: 12px;" | {{#if:{{{templatename|}}}|<span style="float: left; margin-left: 5px; font-size: 9px; font-weight: normal;">[[Template:{{{templatename}}}|<span style="color: #fff">v</span>]] &middot; [[Template talk:{{{templatename}}}|<span style="color: #fff">d</span>]] &middot; <span class="plainlinks">[{{fullurl:Template:{{{templatename}}}|action=edit}} <span style="color: #fff">e</span>]</span></span>|}}<span style="color: #fff">{{{title}}}</span>
 
|-
 
|-
 
{{#if:{{{group1|}}} |
 
{{#if:{{{group1|}}} |

Revision as of 22:02, 28 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