Jump to content

Template:Navbox: Difference between revisions

From DevilutionX Wiki
m Fix missing section
No edit summary
Line 3: Line 3:
! colspan="2" class="dxx-navbox-title" | {{{title|Navigation}}}
! colspan="2" class="dxx-navbox-title" | {{{title|Navigation}}}


<!-- ===== BLOCK 1 ===== -->
{{#if:{{{header1|}}}|
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header1}}}
! colspan="2" class="dxx-navbox-header" | {{{header1|}}}
}}
{{#if:{{{list1|}}}|
|-
|-
{{#if:{{{group1|}}}|
! class="dxx-navbox-group" | {{{group1|}}}
! class="dxx-navbox-group" | {{{group1}}}
| class="dxx-navbox-list"  | {{{list1|}}}
| class="dxx-navbox-list"  | {{{list1}}}
}}{{#if:{{{group1|}}}||
! colspan="2" class="dxx-navbox-list" | {{{list1}}}
}}
}}


<!-- ===== BLOCK 2 ===== -->
{{#if:{{{header2|}}}|
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header2}}}
! colspan="2" class="dxx-navbox-header" | {{{header2|}}}
}}
{{#if:{{{list2|}}}|
|-
|-
{{#if:{{{group2|}}}|
! class="dxx-navbox-group" | {{{group2|}}}
! class="dxx-navbox-group" | {{{group2}}}
| class="dxx-navbox-list"  | {{{list2|}}}
| class="dxx-navbox-list"  | {{{list2}}}
}}{{#if:{{{group2|}}}||
! colspan="2" class="dxx-navbox-list" | {{{list2}}}
}}
}}


<!-- ===== BLOCK 3 ===== -->
{{#if:{{{header3|}}}|
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header3}}}
! colspan="2" class="dxx-navbox-header" | {{{header3|}}}
}}
{{#if:{{{list3|}}}|
|-
|-
{{#if:{{{group3|}}}|
! class="dxx-navbox-group" | {{{group3|}}}
! class="dxx-navbox-group" | {{{group3}}}
| class="dxx-navbox-list"  | {{{list3|}}}
| class="dxx-navbox-list"  | {{{list3}}}
}}{{#if:{{{group3|}}}||
! colspan="2" class="dxx-navbox-list" | {{{list3}}}
}}
}}


<!-- ===== BLOCK 4 ===== -->
{{#if:{{{header4|}}}|
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header4}}}
! colspan="2" class="dxx-navbox-header" | {{{header4|}}}
}}
{{#if:{{{list4|}}}|
|-
|-
{{#if:{{{group4|}}}|
! class="dxx-navbox-group" | {{{group4|}}}
! class="dxx-navbox-group" | {{{group4}}}
| class="dxx-navbox-list"  | {{{list4|}}}
| class="dxx-navbox-list"  | {{{list4}}}
}}{{#if:{{{group4|}}}||
! colspan="2" class="dxx-navbox-list" | {{{list4}}}
}}
}}


<!-- ===== BLOCK 5 ===== -->
{{#if:{{{header5|}}}|
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header5}}}
! colspan="2" class="dxx-navbox-header" | {{{header5|}}}
}}
{{#if:{{{list5|}}}|
|-
|-
{{#if:{{{group5|}}}|
! class="dxx-navbox-group" | {{{group5|}}}
! class="dxx-navbox-group" | {{{group5}}}
| class="dxx-navbox-list"  | {{{list5|}}}
| class="dxx-navbox-list"  | {{{list5}}}
}}{{#if:{{{group5|}}}||
! colspan="2" class="dxx-navbox-list" | {{{list5}}}
}}
}}


<!-- ===== BLOCK 6 ===== -->
{{#if:{{{header6|}}}|
|-
|-
! colspan="2" class="dxx-navbox-header" | {{{header6}}}
! colspan="2" class="dxx-navbox-header" | {{{header6|}}}
}}
{{#if:{{{list6|}}}|
|-
|-
{{#if:{{{group6|}}}|
! class="dxx-navbox-group" | {{{group6|}}}
! class="dxx-navbox-group" | {{{group6}}}
| class="dxx-navbox-list"  | {{{list6|}}}
| class="dxx-navbox-list"  | {{{list6}}}
}}{{#if:{{{group6|}}}||
! colspan="2" class="dxx-navbox-list" | {{{list6}}}
}}
}}


|}
|}
Line 97: Line 43:


<noinclude>
<noinclude>
Navbox meta-template used to build navigation boxes.
Basic navbox meta-template used to build navigation boxes.


* <code>title</code> – navbox title
* <code>title</code> – required; navbox title
* <code>headerN</code> – optional section headings
* <code>headerN</code> – optional section headers (full-width)
* <code>groupN</code> – optional left label (if omitted, listN spans both columns)
* <code>groupN</code> – label in left column
* <code>listN</code> – links or {{ItemList}}; can be written as a bullet list
* <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>

Revision as of 22:58, 30 November 2025


Basic navbox meta-template used to build navigation boxes.

  • title – required; navbox title
  • headerN – optional section headers (full-width)
  • groupN – label in left column
  • listN – content in right column (links, Template:ItemList, etc.)

Up to 6 header/group/list blocks are supported here. Copy-paste the pattern if you ever need more.