Difference between revisions of "Template:Section depth"
Jump to navigation
Jump to search
m (Addition of the missing </noinclude>.) |
(Fixes for the parameter names.) |
||
Line 1: | Line 1: | ||
− | {{#switch: {{{ | + | {{#switch: {{{base|1}}} |
| 1 = {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}} | | 1 = {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}} | ||
| 2 = {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}} | | 2 = {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}} | ||
Line 17: | Line 17: | ||
<nowiki>{{</nowiki>''section depth'' | <nowiki>{{</nowiki>''section depth'' | ||
− | | | + | | base = |
− | | | + | | dyn = |
| heading = | | heading = | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
Line 30: | Line 30: | ||
=== Example === | === Example === | ||
− | <nowiki>{{section depth| | + | <nowiki>{{section depth|dyn=3|base=4|heading=This is a level 6 heading}}</nowiki> |
− | {{section depth| | + | {{section depth|dyn=3|base=4|heading=This is a level 6 heading}} |
}} | }} | ||
</noinclude> | </noinclude> |
Revision as of 09:30, 16 October 2015
{{{heading}}}
Template documentation
Contents
The Section depth template
Goal
To allow for dynamically changing the depth of headings.
Usage
{{section depth | base = | dyn = | heading = }}
- base
- The base depth which defaults to 1.
- dyn
- The obligatory dynamic heading depth.
- heading
- The heading text.
The final heading depth is calculated as default - 1 + dyn.
Example
{{section depth|dyn=3|base=4|heading=This is a level 6 heading}}