Kentsmith9 (talk | contribs) (Added spaces around heading) |
Kentsmith9 (talk | contribs) (Swapped to correct {{Eq}} Template) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#switch: {{{1}}} | {{#switch: {{{1}}} | ||
| 2 = {{ | | 2 = {{Eq}}{{Eq}} | ||
| 3 = {{ | | 3 = {{Eq}}{{Eq}}{{Eq}} | ||
| 4 = {{ | | 4 = {{Eq}}{{Eq}}{{Eq}}{{Eq}} | ||
| 5 = {{ | | 5 = {{Eq}}{{Eq}}{{Eq}}{{Eq}}{{Eq}} | ||
| 6 = {{ | | 6 = {{Eq}}{{Eq}}{{Eq}}{{Eq}}{{Eq}}{{Eq}} | ||
| {{ | | {{Eq}}{{Eq}} | ||
}} {{{2}}} {{#switch: {{{1}}} | }} {{{2}}} {{#switch: {{{1}}} | ||
| 2 = {{ | | 2 = {{Eq}}{{Eq}} | ||
| 3 = {{ | | 3 = {{Eq}}{{Eq}}{{Eq}} | ||
| 4 = {{ | | 4 = {{Eq}}{{Eq}}{{Eq}}{{Eq}} | ||
| 5 = {{ | | 5 = {{Eq}}{{Eq}}{{Eq}}{{Eq}}{{Eq}} | ||
| 6 = {{ | | 6 = {{Eq}}{{Eq}}{{Eq}}{{Eq}}{{Eq}}{{Eq}} | ||
| {{ | | {{Eq}}{{Eq}} | ||
}}<noinclude>{{documentation}}</noinclude> | }}<noinclude>{{documentation}}</noinclude> |
Latest revision as of 17:27, 11 March 2014
== {{{2}}} ==
Usage
This template enables a selectable number of "=" to be displayed before and after a text string creating a heading. This enables headings to be variable especially in transcludable pages where the headings may be at different levels depending upon where it is placed.
Parameters
There are two required parameters. The first is the number of equal signs desired indicating the heading level. The second is the heading text.
Example
Base page content
When setting up the base page or template use the following:
{{Heading|{{{1|3}}}|Level three heading on its own page}} {{Heading|{{#expr:{{{1|3}}}+1}}|Level four heading on its own page}}
produces:
=== Level three heading on its own page === ==== Level four heading on its own page ====
The calling page
When calling the base page or template into another page use the following:
{{Base Page|4}}
produces:
==== Level three heading on its own page ==== ===== Level four heading on its own page =====
Notice the level now starts at level 4 and increments from there when the page is transcluded into another page
The above documentation is transcluded from Template:Heading/doc. Please add categories to the /doc subpage. Subpages of this template. |