Always snap to grid

Difference between revisions of "Template:Navbox"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
Line 1: Line 1:
 
<table class="navbox" style="{{{style|}}}"><tr class="navbox-header"><th colspan="2" class="navbox-header" style="{{{titlestyle|}}}"><div style="position:relative; width:100%; white-space:nowrap;">{{Tnavbar|{{{name}}}|style=position:absolute;left:0.5em;}}{{{title}}}</div></th></tr><tr class="navbox-body odd">{{
 
<table class="navbox" style="{{{style|}}}"><tr class="navbox-header"><th colspan="2" class="navbox-header" style="{{{titlestyle|}}}"><div style="position:relative; width:100%; white-space:nowrap;">{{Tnavbar|{{{name}}}|style=position:absolute;left:0.5em;}}{{{title}}}</div></th></tr><tr class="navbox-body odd">{{
 
#if:{{{group1|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group1}}}</th>}}
 
#if:{{{group1|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group1}}}</th>}}
<td {{#if:{{{group1|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}">{{{list1|{{{body}}}}}}{{{cat|}}}</td></tr>{{
+
<td {{#if:{{{group1|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}{{{oddstyle|}}}">{{{list1|{{{body}}}}}}</td></tr>{{
#if: {{{list2|}}}|<tr class="navbox-body even">{{#if:{{{group2|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group2}}}</th>}}<td {{#if:{{{group2|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}">{{{list2}}}</td></tr>}}{{
+
#if: {{{list2|}}}|<tr class="navbox-body even">{{#if:{{{group2|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group2}}}</th>}}<td {{#if:{{{group2|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}{{{evenstyle|}}}">{{{list2}}}</td></tr>}}{{
#if: {{{list3|}}}|<tr class="navbox-body odd">{{#if:{{{group3|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group3}}}</th>}}<td {{#if:{{{group3|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}">{{{list3}}}</td></tr>}}{{
+
#if: {{{list3|}}}|<tr class="navbox-body odd">{{#if:{{{group3|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group3}}}</th>}}<td {{#if:{{{group3|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}{{{oddstyle|}}}">{{{list3}}}</td></tr>}}{{
#if: {{{list4|}}}|<tr class="navbox-body even">{{#if:{{{group4|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group4}}}</th>}}<td {{#if:{{{group4|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}">{{{list4}}}</td></tr>}}{{
+
#if: {{{list4|}}}|<tr class="navbox-body even">{{#if:{{{group4|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group4}}}</th>}}<td {{#if:{{{group4|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}{{{evenstyle|}}}">{{{list4}}}</td></tr>}}{{
#if: {{{list5|}}}|<tr class="navbox-body odd">{{#if:{{{group5|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group5}}}</th>}}<td {{#if:{{{group5|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}">{{{list5}}}</td></tr>}}{{
+
#if: {{{list5|}}}|<tr class="navbox-body odd">{{#if:{{{group5|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group5}}}</th>}}<td {{#if:{{{group5|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}{{{oddstyle|}}}">{{{list5}}}</td></tr>}}{{
#if: {{{list6|}}}|<tr class="navbox-body even">{{#if:{{{group6|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group6}}}</th>}}<td {{#if:{{{group6|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}">{{{list6}}}</td></tr>}}</table><noinclude>
+
#if: {{{list6|}}}|<tr class="navbox-body even">{{#if:{{{group6|}}}|<th class="navbox-group" style="{{{groupstyle|}}}">{{{group6}}}</th>}}<td {{#if:{{{group6|}}}||colspan="2"}} class="navbox-body" style="{{{bodystyle|}}}{{{evenstyle|}}}">{{{list6}}}</td></tr>}}</table><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 08:05, 5 March 2008

[edit] Documentation

This template provides a basic framework for a navigation box.

Usage

A simple navigation box:

{{navbox
| name  = Navbox/doc
| title = Navigation
| body  = (some links here)
}}

The parameter title is mandatory and defines the navigation box title. The name is optional and specifies the name of the template that implements the navigation box for the view/discuss/edit links in the top right corner. The parameter body is an alias for list1 (see next example) and specifies the content of the (first list of the) navigation box. The optional parameters headerstyle and bodystyle can be used to modify the appearance of the navigation box.

A navigation box with two named list groups:

{{navbox
| name   = Navbox/doc
| title  = Navigation
| group1 = Group 1
| list1  = (some links here)
| group2 = Group 2
| list2  = (some more links)
}}

Up to six list groups are supported. Group labels are optional and will not be rendered if empty. Labeled and unlabeled lists can be used in the same navigation box.

Group labels can be customized with the groupstyle parameter. Additionally odd and even list bodies can be customized with the oddstyle and evenstyle properties respectively.