From GamingWiki
m (Protected "Template:Navbox": High traffic page ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 42: | Line 42: | ||
-->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!-- | -->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!-- | ||
− | + | -->{{#vardefine: columns | {{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}} }}<!-- | |
---Title and Navbar--- | ---Title and Navbar--- | ||
Line 48: | Line 48: | ||
--><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!-- | --><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!-- | ||
--><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- | --><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!-- | ||
− | -->colspan={{#expr: | + | -->colspan={{#expr:{{#var:columns}}{{#if:{{{titlegroup|}}}|-1}}}} <!-- |
-->class="navbox-title"><!-- | -->class="navbox-title"><!-- | ||
Line 64: | Line 64: | ||
DEBUG | DEBUG | ||
− | -->{{#tag:pre| | + | --><!--{{#tag:pre| |
groups: {{{groups}}} | groups: {{{groups}}} | ||
lists: {{{lists}}} | lists: {{{lists}}} | ||
Line 72: | Line 72: | ||
list1 var: {{#var:list1}} | list1 var: {{#var:list1}} | ||
numrows: {{#var:numrows}} | numrows: {{#var:numrows}} | ||
− | }}<!-- | + | }}--><!-- |
Line 79: | Line 79: | ||
-->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- | -->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- | ||
--><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!-- | --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!-- | ||
− | -->colspan="{{#expr: | + | -->colspan="{{#expr:{{#var:columns}}}}">{{{above}}}</td></tr>}}<!-- |
DEBUG | DEBUG | ||
− | --><pre>---Body---</pre><!-- | + | --><!--<pre>---Body---</pre>--><!-- |
---Body--- | ---Body--- | ||
− | -- | + | -- Deal with image considerations -- |
− | -->{{# | + | -->{{#vardefine: doimageleft | {{{imageleft|}}} }}<!-- |
− | + | -->{{#vardefine: doimageright | {{{image|}}} }}<!-- | |
− | + | -->{{#vardefine: imgrowspan | {{#expr:{{#var:numrows}}*2 }} }}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
DEBUG | DEBUG | ||
− | --><pre>--- | + | --><!--<pre>--- all rows ---</pre>--><!-- |
---Remaining groups/lists--- | ---Remaining groups/lists--- | ||
Line 132: | Line 100: | ||
-->{{#loop: nboxD|1|{{#var: numrows}}<!-- | -->{{#loop: nboxD|1|{{#var: numrows}}<!-- | ||
-->|<!-- | -->|<!-- | ||
+ | |||
-->{{#vardefine: modtwo | {{#expr: ({{#var:nboxD}} {{#ifeq:{{{evenodd|}}}|swap|+1|}}) mod 2 }} }}<!-- | -->{{#vardefine: modtwo | {{#expr: ({{#var:nboxD}} {{#ifeq:{{{evenodd|}}}|swap|+1|}}) mod 2 }} }}<!-- | ||
-->{{#vardefine: parity | {{#ifeq: {{#var:modtwo}} | 1 | odd | even }} }}<!-- | -->{{#vardefine: parity | {{#ifeq: {{#var:modtwo}} | 1 | odd | even }} }}<!-- | ||
Line 138: | Line 107: | ||
-->|<!-- a list or group exists | -->|<!-- a list or group exists | ||
-->{{#if:{{{title|}}}{{{above|}}}{{#var:list1}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- | -->{{#if:{{{title|}}}{{{above|}}}{{#var:list1}}|<tr style="height:2px"><td></td></tr>}}<tr><!-- | ||
+ | -->{{#if:{{#var:doimageleft}}|<!-- | ||
+ | --><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!-- | ||
+ | -->rowspan="{{#var:imgrowspan}}"><!-- | ||
+ | -->{{#doimageleft}}</td><!-- | ||
+ | -->{{#vardefine: doimageleft|}}<!-- | ||
+ | -->}}<!-- | ||
-->{{#if:{{#var:group{{#var:nboxD}}}}<!-- | -->{{#if:{{#var:group{{#var:nboxD}}}}<!-- | ||
-->|<!-- add a group header cell | -->|<!-- add a group header cell | ||
Line 166: | Line 141: | ||
-->| afterlast = <!-- | -->| afterlast = <!-- | ||
-->}}<!-- | -->}}<!-- | ||
− | --></div></td></tr><!-- | + | --></div></td><!-- |
+ | -->{{#if:{{#var:doimageright}}|<!-- | ||
+ | --><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!-- | ||
+ | -->rowspan="{{#var:imgrowspan}}"><!-- | ||
+ | -->{{#var:doimageright}}</td><!-- | ||
+ | -->{{#vardefine: doimageright|}}<!-- | ||
+ | -->}}<!-- | ||
+ | --></tr><!-- | ||
-->}}<!-- end if list or group exists | -->}}<!-- end if list or group exists | ||
-->}}<!-- end loop | -->}}<!-- end loop | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 216: | Line 158: | ||
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- | -->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!-- | ||
--><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!-- | --><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!-- | ||
− | -->colspan="{{#expr: | + | -->colspan="{{#expr:{{#var:columns}}}}">{{{below}}}</td></tr>}}<!-- |
Latest revision as of 01:30, 28 April 2011
[create]
Error creating thumbnail: File missing
Template documentation Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |