From WikiTemp, the GBAtemp wiki
m (Test #1)
 
m
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="NavFrame">
+
{| class="navbox {{#ifeq:{{lc:{{{collapse|auto}}}}}|disable||collapsible {{#switch:{{lc:{{{collapse|auto}}}}}|yes=collapsed|no=|auto|#default=autocollapse}}}}"
  <div class="NavHead">{{{title|Navbox Title}}}</div>
+
!class="navbox-title" colspan="{{#expr:2{{#if:{{{image|}}}|{{#if:{{{list1|}}}|+1}}}}}}" style="padding-top:3px;padding-bottom:3px; padding-left:70px; color:#222; font-size:11px; {{#ifeq:{{lc:{{{collapse|auto}}}}}|disable|padding-right:70px;}}"|'''{{{title|Navigation}}}'''
  <div class="NavContent">
+
{{#if:{{{above|}}}|
    <table>
+
{{!}}-
{{#if:{{{above|}}}|<tr><td class="navbox-abovebelow" colspan="2">{{{above}}}</td></tr>}}
+
{{!}}class="navbox-abovebelow" colspan="{{#expr:2{{#if:{{{image|}}}|{{#if:{{{list1|}}}|+1}}}}}}" style="padding:3px;"{{!}}{{{above}}}
{{#if:{{{group1|}}}|<tr><th>{{{group1}}}</th><td class="navbox-uneven">{{{list1|}}}</td></tr>}}
+
}}
{{#if:{{{group2|}}}|<tr><th>{{{group2}}}</th><td class="navbox-even">{{{list2|}}}</td></tr>}}
+
|-
{{#if:{{{group3|}}}|<tr><th>{{{group3}}}</th><td class="navbox-uneven">{{{list3|}}}</td></tr>}}
+
{{#if:{{{list1|}}}|{{NavBoxGroup|{{{group1|}}}|{{{list1|}}}}}
{{#if:{{{group4|}}}|<tr><th>{{{group4}}}</th><td class="navbox-even">{{{list4|}}}</td></tr>}}
+
{{#if:{{{image|}}}|
{{#if:{{{group5|}}}|<tr><th>{{{group5}}}</th><td class="navbox-uneven">{{{list5|}}}</td></tr>}}
+
{{!}}style="width:{{{imagewidth|100px}}};" rowspan="{{#expr:0{{#if:{{{list1|}}}|+1}}{{#if:{{{list2|}}}|+1}}{{#if:{{{list3|}}}|+1}}{{#if:{{{list4|}}}|+1}}{{#if:{{{list5|}}}|+1}}{{#if:{{{list6|}}}|+1}}{{#if:{{{list7|}}}|+1}}}}"{{!}}[[{{{image|}}}|{{{imagewidth|100px}}}]]
{{#if:{{{below|}}}|<tr><td class="navbox-abovebelow" colspan="2">{{{below}}}</td></tr>}}
+
}}}}
  </table>
+
|-
  </div>
+
{{#if:{{{list2|}}}|{{NavBoxGroup|{{{group2|}}}|{{{list2|}}}}}}}
</div>
+
|-
 +
{{#if:{{{list3|}}}|{{NavBoxGroup|{{{group3|}}}|{{{list3|}}}}}}}
 +
|-
 +
{{#if:{{{list4|}}}|{{NavBoxGroup|{{{group4|}}}|{{{list4|}}}}}}}
 +
|-
 +
{{#if:{{{list5|}}}|{{NavBoxGroup|{{{group5|}}}|{{{list5|}}}}}}}
 +
|-
 +
{{#if:{{{list6|}}}|{{NavBoxGroup|{{{group6|}}}|{{{list6|}}}}}}}
 +
|-
 +
{{#if:{{{list7|}}}|{{NavBoxGroup|{{{group7|}}}|{{{list7|}}}}}}}
 +
|-
 +
{{#if:{{{below|}}}|
 +
{{!}}-
 +
{{!}}class="navbox-abovebelow" colspan="{{#expr:2{{#if:{{{image|}}}|{{#if:{{{list1|}}}|+1}}}}}}"{{!}}{{{below}}}
 +
}}
 +
|}<noinclude>
 +
 
 +
 
 +
<nowiki/>
 +
[[Category:Navigation Templates]]
 +
{{documentation}}</noinclude>

Latest revision as of 04:09, 12 May 2011


↑ Template Documentation ↓ [EditReload]

This template is mainly to be used in Navigation templates. It is also possible to use it directly on a page though.

Parameters

  • Title = Title of the box, the only part that will not be hidden. (default = "Navigation")
  • Collapse = Should the box collapse by default?
    • Yes = Collapsed by default.
    • No = Open by default.
    • Auto = Collapse if there are other NavBoxes on the page. (default setting)
    • Disable = Hide the [show/hide] button, preventing collapsing.
  • Above = Text to appear on the top.
  • Group1 = Title of Group 1.
  • List1 = List of Group 1.
  • Group2 = Title of Group 2.
  • List2 = List of Group 2.
  • ...
  • Group7 = Title of Group 7.
  • List7 = List of Group 7.
  • Image = Image to appear on the right. List1 must be included for this to work! You don't need to add the [[ ]].
  • Imagewidth = Possibility to change the width of the image (default 100px).
  • Below = Text to appear on the bottom.

Notes

  1. If you include a list without a group, the list will take the full width and have centered text.
  2. If you include a group without a list, the row won't appear at all.
  3. You don't need to add the groups in order, though this is recommended.

Example

{{NavBox
|title = Click show on the right
|collapse = Auto <!-- To see this in effect, see the difference between the Template page and the /doc subpage -->
|above = Top text
|group1 = First
|list1 = Test
|group4 = Second?
|list4 = [[Main Page]]
|list3 = ''List can go before the group''
|group3 = Third?
|list5 = This list has no group, so is centered.
|group7 = This group has no list, so doesn't show.
|image = Image:Ak22.jpg
|imagewidth = 70px
|below = '''Bottom text'''}}

The text above produces:


The above documentation was Transcluded from the /doc subpage