Template:Navbox: Difference between revisions
From Vintage Story Wiki
Tag: Undo |
(Added up to 20 groups) |
||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
<!-- Group 1 --> | <!-- Group 1 --> | ||
<tr> | <tr> | ||
{{#if: {{{group1|}}} |<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | {{#if: {{{group1|}}} |<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group1}}}'''</td>}} | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}}; ">{{{body1|}}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}}; ">{{{body1|}}}</td> | ||
</tr> | </tr> | ||
Line 16: | Line 16: | ||
{{#if: {{{group2|}}} | | {{#if: {{{group2|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group2}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body2|}}}|{{{body2}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body2|}}}|{{{body2}}}|}}</td> | ||
</tr> | </tr> | ||
Line 23: | Line 23: | ||
{{#if: {{{group3|}}} | | {{#if: {{{group3|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group3}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body3|}}}|{{{body3}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body3|}}}|{{{body3}}}|}}</td> | ||
</tr> | </tr> | ||
Line 30: | Line 30: | ||
{{#if: {{{group4|}}} | | {{#if: {{{group4|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group4}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body4|}}}|{{{body4}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body4|}}}|{{{body4}}}|}}</td> | ||
</tr> | </tr> | ||
Line 37: | Line 37: | ||
{{#if: {{{group5|}}} | | {{#if: {{{group5|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group5}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body5|}}}|{{{body5}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body5|}}}|{{{body5}}}|}}</td> | ||
</tr> | </tr> | ||
Line 44: | Line 44: | ||
{{#if: {{{group6|}}} | | {{#if: {{{group6|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group6}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body6|}}}|{{{body6}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body6|}}}|{{{body6}}}|}}</td> | ||
</tr> | </tr> | ||
Line 51: | Line 51: | ||
{{#if: {{{group7|}}} | | {{#if: {{{group7|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group7}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body7|}}}|{{{body7}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body7|}}}|{{{body7}}}|}}</td> | ||
</tr> | </tr> | ||
Line 58: | Line 58: | ||
{{#if: {{{group8|}}} | | {{#if: {{{group8|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group8}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body8|}}}|{{{body8}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body8|}}}|{{{body8}}}|}}</td> | ||
</tr> | </tr> | ||
Line 65: | Line 65: | ||
{{#if: {{{group9|}}} | | {{#if: {{{group9|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group9}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body9|}}}|{{{body9}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #CCBCAB | #e0cfbb}};">{{#if: {{{body9|}}}|{{{body9}}}|}}</td> | ||
</tr> | </tr> | ||
Line 72: | Line 72: | ||
{{#if: {{{group10|}}} | | {{#if: {{{group10|}}} | | ||
<tr> | <tr> | ||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; | <td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 10%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group10}}}'''</td> | ||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body10|}}}|{{{body10}}}|}}</td> | <td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body10|}}}|{{{body10}}}|}}</td> | ||
</tr> | |||
}} | |||
<!-- Group 11 --> | |||
{{#if: {{{group11|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 11%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group11}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body11|}}}|{{{body11}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 12 --> | |||
{{#if: {{{group12|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 12%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group12}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body12|}}}|{{{body12}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 13 --> | |||
{{#if: {{{group13|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 13%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group13}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body13|}}}|{{{body13}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 14 --> | |||
{{#if: {{{group14|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 14%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group14}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body14|}}}|{{{body14}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 15 --> | |||
{{#if: {{{group15|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 15%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group15}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body15|}}}|{{{body15}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 16 --> | |||
{{#if: {{{group16|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 16%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group16}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body16|}}}|{{{body16}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 17 --> | |||
{{#if: {{{group17|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 17%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group17}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body17|}}}|{{{body17}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 18 --> | |||
{{#if: {{{group18|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 18%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group18}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body18|}}}|{{{body18}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 19 --> | |||
{{#if: {{{group19|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 19%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group19}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body19|}}}|{{{body19}}}|}}</td> | |||
</tr> | |||
}} | |||
<!-- Group 20 --> | |||
{{#if: {{{group20|}}} | | |||
<tr> | |||
<td style="height: 30px; {{#if: {{{groupstyle|}}}|{{{groupstyle}}}| text-align: center; width: 20%; background: #5B4C3E; color:#e0cfbb;}}">'''{{{group20}}}'''</td> | |||
<td style="{{{bodystyle|}}} background:{{#if: {{{swap|}}}| #e0cfbb | #CCBCAB }};">{{#if: {{{body20|}}}|{{{body20}}}|}}</td> | |||
</tr> | </tr> | ||
}} | }} |
Latest revision as of 14:45, 28 August 2022
[view | edit | history | purge this page]Documentation
This template serves as the base for any navbox templates, providing a customizable layout to build off of. Each navbox can currently contain up to 10 nav groups, along with a theoretically infinite number of subgroups thanks to child navboxes.
Usage
While the parameters up to only group2 are listed here, it is possible to have up to 10 different groups group1-10
. The content of bodyN
can contain a child navbox which has child=true
, allowing for up to 10 subgroups per group.
{{Navbox |child = If this navbox should be formatted as a child navbox |title = Navbox title |group1 = First group title |body1 = First group body content |group2 = Second group title |body2 = Second group body content |groupN = N group title |bodyN = N group body content }}
Parameter | Description | Type | Required |
---|---|---|---|
child | If this navbox should be formatted as a child navbox -- disables the outer div primarily | Boolean | no |
title | The title shown at the top of the navbox | String | yes |
group1 | The title for the first group | Content | suggested |
body1 | The content to feature in the first groups' body | Content | suggested |
group2 | The title for the second group | Content | suggested |
body2 | The content to feature in the second groups' body | Content | suggested |
groupN | The title for the N group | Content | suggested |
bodyN | The content to feature in the N groups' body | Content | suggested |
Example
Code | Result | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Navbox |title = Example navbox |group1 = Group 1 |body1 = Group 1 content |group2 = Group 2 |body2 = {{Navbox |child = true |group1 = Group 2.1 |body1 = Group 2.1 content |group2 = Group 2.2 |body2 = Group 2.2 content |group3 = Group 2.3 |body3 = Group 2.3 content }} |group3 = Group 3 |body3 = Group 3 content<br/> With a second line }} |
|
[view | edit | history | purge this page]The above documentation is transcluded from Template:Navbox/doc.