ConfigPage – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Fix) |
Lou Montana (talk | contribs) (Fix width when notoc) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch:{{lc:{{{1}}}}} | <includeonly>{{#switch:{{lc:{{{1}}}}} | ||
|start= {{#if:{{{notoc|}}}||{{TOC|side|1||nonum}}}} | |start= {{#if:{{{notoc|}}}||{{TOC|side|1||nonum}}}} | ||
<div class="cfg_reference"> | <div class="cfg_reference"{{#if:{{{notoc|}}}|<nowiki> style="width: auto"}}> | ||
{{#switch:{{PAGENAME}} | {{#switch:{{PAGENAME}} | ||
|CfgMoves Config Reference | |CfgMoves Config Reference |
Revision as of 12:33, 4 December 2023
This template in three parts (all mandatory) creates and styles a config page. It automatically adds the table of contents (ToC) via {{TOC}} usage.
A special {{TopMenu}} is added to the following pages:
- CfgMoves Config Reference
- CfgVehicles Config Reference
- CfgWeapons Config Reference
- CfgMagazines Config Reference
- CfgAmmo Config Reference
This template is used on these pages.
Usage
{{ConfigPage|type}}
- type: (case-insensitive) can be one of:
- start - to be placed at the very top of a Cfg page
- abc - to be placed above the first letter:
- a letter index is a level 3 title (e.g === A ===)
- an entry is a level 4 title ((e.g ==== Apple ====)
- an entry's subtitle can be a level 5 title ((e.g ===== Details =====)
- level 6 titles are not stylised
- end - to be placed at the bottom of the page, just above categories
Code | Result |
---|---|
{{ConfigPage}} |
Wrong {{ConfigPage}} template usage!
|
{{ConfigPage|test}} |
Wrong {{ConfigPage}} template usage! "test" is an invalid value.
|
{{ConfigPage|start}} = Level 1 = Should not be used unless absolute necessity, e.g on a huge page where '''level 2''' are not enough. == Level 2 == === Level 3 === {{ConfigPage|abc}} === A === ==== Apple ==== A fruit === B === ==== Bee ==== An insect === C === ==== Cow ==== A mammal ===== Details ===== But not just that ====== Level 6 ====== Not stylised. {{ConfigPage|end}} |
Level 1Should not be used unless absolute necessity, e.g on a huge page where level 2 are not enough. Level 2Level 3AAppleA fruit BBeeAn insect CCowA mammal DetailsBut not just that Level 6Not stylised. |