Line 40: |
Line 40: |
| {{box|Thank you for your help with the wiki Rick!<br/> | | {{box|Thank you for your help with the wiki Rick!<br/> |
| From the wiki team.}} | | From the wiki team.}} |
− |
| |
− | === Templated headings ===
| |
− |
| |
− | We use templates with default parameters to adjust the heading levels inside templates to match those of the including page. For example: The template "Template:Games" contains headings and sub headings as follows:
| |
− |
| |
− | <pre>Games can be roughly divided into two types.
| |
− | === Games I like ===
| |
− | My favorite games are MMOs.
| |
− | === Games I don't like ===
| |
− | My least favorite games are those with P2W.</pre>
| |
− |
| |
− | Suppose we wish to include this template on the following regular page:
| |
− |
| |
− | <pre>My favorite and least favorite things
| |
− | === Games ===
| |
− | {{Games}}
| |
− | === Balloons ===
| |
− | I like all balloons!</pre>
| |
− |
| |
− | The result has all headings at the same level, which may be confusing to the reader:
| |
− |
| |
− | {{box|My favorite and least favorite things
| |
− | <h2> Games </h2>
| |
− | <h2>Games I like</h2>
| |
− | My favorite games are MMOs.
| |
− | <h2> Games I don't like </h2>
| |
− | My least favorite games are those with P2W.
| |
− | <h2> Balloons </h2>
| |
− | I like all balloons!}}
| |
− |
| |
− | Instead, we use a template parameter with a default value to adjust the heading levels.
| |
− |
| |
− | <pre>My favorite and least favorite things
| |
− | === Games ===
| |
− | {{Games|====}}
| |
− | === Balloons ===
| |
− | I like all balloons!</pre>
| |
− |
| |
− | Template:Games page:
| |
− |
| |
− | <pre>Games can be roughly divided into two types.
| |
− | {{{1|===}}} Games I like {{{1|===}}}
| |
− | My favorite games are MMOs.
| |
− | {{{1|===}}} Games I don't like {{{1|===}}}
| |
− | My least favorite games are those with P2W.</pre>
| |
− |
| |
− | The result is much easier to read.
| |
− |
| |
− | {{box|My favorite and least favorite things
| |
− | <h2> Games </h2>
| |
− | <h3>Games I like</h3>
| |
− | My favorite games are MMOs.
| |
− | <h3> Games I don't like </h3>
| |
− | My least favorite games are those with P2W.
| |
− | <h2> Balloons </h2>
| |
− | I like all balloons!}}
| |