Changes

Jump to navigation Jump to search

Template:Section depth

1,243 bytes added, 09:26, 16 October 2015
Created a template for dynamically changing the depth of headings.
{{#switch: {{{default|1}}}
| 1 = {{#switch: {{{dyn|}}} | 1 = = | 2 = == | 3 = === | ==}}{{{heading}}}{{#switch: {{{level|}}} | 1 = = | 2 = == | 3 = === | ==}}
| 2 = {{#switch: {{{dyn|}}} | 1 = == | 2 = === | 3 = ==== | ===}}{{{heading}}}{{#switch: {{{level|}}} | 1 = == | 2 = === | 3 = ==== | ===}}
| 3 = {{#switch: {{{dyn|}}} | 1 = === | 2 = ==== | 3 = ===== | ====}}{{{heading}}}{{#switch: {{{level|}}} | 1 = === | 2 = ==== | 3 = ===== | ====}}
| 4 = {{#switch: {{{dyn|}}} | 1 = ==== | 2 = ===== | 3 = ====== | =====}}{{{heading}}}{{#switch: {{{level|}}} | 1 = ==== | 2 = ===== | 3 = ====== | =====}}
}}<noinclude>

{{Template info |1=
== The {{PAGENAME}} template ==

=== Goal ===

To allow for dynamically changing the depth of headings.


=== Usage ===

<nowiki>{{</nowiki>''section depth''
&#124; default =
&#124; level =
&#124; heading =
<nowiki>}}</nowiki>

; 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 ===

<nowiki>{{section depth|level=3|default=4|heading=This is a level 6 heading}}</nowiki>

{{section depth|level=3|default=4|heading=This is a level 6 the heading}}

}}
Trusted, Bureaucrats
4,228

edits

Navigation menu