Template:Navbox: Difference between revisions

No edit summary
No edit summary
Line 2: Line 2:
{| class="navbox dxx-navbox"
{| class="navbox dxx-navbox"
! colspan="2" class="dxx-navbox-title" | {{{title|Navigation}}}
! colspan="2" class="dxx-navbox-title" | {{{title|Navigation}}}
{{{body|}}}
|}
</includeonly>


<!-- BLOCK 1 -->
<noinclude>
{{#if:{{{header1|}}}|
Base wrapper for DevilutionX navboxes.
|-
! colspan="2" class="dxx-navbox-header" | {{{header1}}}
}}
{{#if:{{{group1|}}}{{{list1|}}}|
|-
! class="dxx-navbox-group" | {{{group1|}}}
| class="dxx-navbox-list"  | {{{list1}}}
}}


<!-- BLOCK 2 -->
Usage (example):
{{#if:{{{header2|}}}|
|-
! colspan="2" class="dxx-navbox-header" | {{{header2}}}
}}
{{#if:{{{group2|}}}{{{list2|}}}|
|-
! class="dxx-navbox-group" | {{{group2|}}}
| class="dxx-navbox-list"  | {{{list2}}}
}}
 
<!-- BLOCK 3 -->
{{#if:{{{header3|}}}|
|-
! colspan="2" class="dxx-navbox-header" | {{{header3}}}
}}
{{#if:{{{group3|}}}{{{list3|}}}|
|-
! class="dxx-navbox-group" | {{{group3|}}}
| class="dxx-navbox-list"  | {{{list3}}}
}}


<!-- BLOCK 4 -->
<pre>
{{#if:{{{header4|}}}|
{{Navbox
|title = Items
|body =
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header4}}}
! colspan="2" class="dxx-navbox-header" | General
}}
{{#if:{{{group4|}}}{{{list4|}}}|
|-
|-
! class="dxx-navbox-group" | {{{group4|}}}
! class="dxx-navbox-group" | Ores
| class="dxx-navbox-list" | {{{list4}}}
| class="dxx-navbox-list" |
* [[Example item 1]]
* [[Example item 2]]
}}
}}
</pre>


<!-- BLOCK 5 -->
* <code>title</code> – text shown in the navbox title bar 
{{#if:{{{header5|}}}|
* <code>body</code> – full table rows (headers, groups, lists, etc.)
|-
! colspan="2" class="dxx-navbox-header" | {{{header5}}}
}}
{{#if:{{{group5|}}}{{{list5|}}}|
|-
! class="dxx-navbox-group" | {{{group5|}}}
| class="dxx-navbox-list"  | {{{list5}}}
}}
 
<!-- BLOCK 6 -->
{{#if:{{{header6|}}}|
|-
! colspan="2" class="dxx-navbox-header" | {{{header6}}}
}}
{{#if:{{{group6|}}}{{{list6|}}}|
|-
! class="dxx-navbox-group" | {{{group6|}}}
| class="dxx-navbox-list"  | {{{list6}}}
}}
 
|}
</includeonly>
 
<noinclude>
Basic navbox meta-template used to build navigation boxes.
 
* <code>title</code> – required; navbox title
* <code>headerN</code> – optional section headers (full-width)
* <code>groupN</code> – label in left column
* <code>listN</code> – content in right column (links, {{ItemList}}, etc.)
 
Up to 6 header/group/list blocks are supported here. 
Copy-paste the pattern if you ever need more.


[[Category:Navbox templates]]
[[Category:Navbox templates]]
</noinclude>
</noinclude>