Difference between revisions of "Template:Section depth"
Jump to navigation
Jump to search
(Created a template for dynamically changing the depth of headings.) |
(Fixes for the template.) |
||
Line 1: | Line 1: | ||
{{#switch: {{{default|1}}} | {{#switch: {{{default|1}}} | ||
− | | 1 = {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}}{{{heading}}}{{#switch: {{{ | + | | 1 = {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}} |
− | | 2 = {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}}{{{heading}}}{{#switch: {{{ | + | | 2 = {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}} |
− | | 3 = {{#switch: {{{dyn|}}} | 1 = === | 2 = ==== | 3 = ===== | ====}}{{{heading}}}{{#switch: {{{ | + | | 3 = {{#switch: {{{dyn|}}} | 1 = === | 2 = ==== | 3 = ===== | ====}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = === | 2 = ==== | 3 = ===== | ====}} |
− | | 4 = {{#switch: {{{dyn|}}} | 1 = ==== | 2 = ===== | 3 = ====== | =====}}{{{heading}}}{{#switch: {{{ | + | | 4 = {{#switch: {{{dyn|}}} | 1 = ==== | 2 = ===== | 3 = ====== | =====}} {{{heading}}} {{#switch: {{{dyn|}}} | 1 = ==== | 2 = ===== | 3 = ====== | =====}} |
}}<noinclude> | }}<noinclude> | ||
Revision as of 09:27, 16 October 2015
{{{heading}}}
Template documentation
Contents
The Section depth template
Goal
To allow for dynamically changing the depth of headings.
Usage
{{section depth | default = | level = | 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|level=3|default=4|heading=This is a level 6 heading}}