Template:Section/doc
This is a documentation subpage for Template:Section. It contains usage information, categories and other content that is not part of the original template page. |
This template uses a See H:DIVSPAN for details. |
This template uses TemplateStyles: |
Usage
[edit]{{section|name|text}} {{section|name}}
Creates a section anchor which can be linked to (the browser will move down to that section) with [[#name]] (same page) or [[page title#name]] (different page).
Notes
[edit]- Certain characters, will break the section name. Numbers, letters, hyphens, and underscores are universally accepted, so names should probably be restricted to these. However single and double quotes will work. Multiple spaces will be reduced to single spaces, so spaces can be used.
- If the name and/or the text contains an equals sign then the name and/or the text will be broken. As a work around explicitly number the two unnamed parameters and use:
{{section|1=name string|2=text string}}
Examples
[edit]- #First Link — The hash character can be hidden by using a pipe symbol
[[#First Link|First link]]
First Link - Second "Link"
- Third=Link
- Fourth Link
- Fifth Link
{{section|First Link|First Link}}
displays as: First Link
This is an example of text below the first link. The link demonstrates simple text.
{{section|Second "Link"|Second "Link"}}
displays as: Second "Link"
This is an example of text below the second link. The link demonstrates the use of double quotes
{{section|1=Third=Link|2=Third=Link}}
displays as: Third=Link
This is an example of text below the third link. The link demonstrates how to use the template with equal signs in the name and text.
{{section|Fourth Link|The Text does not have to be the same as the text in the link name}}
displays as: The Text does not have to be the same as the text in the link name
This is an example of text below the fourth link. The link demonstrates simple text with different text in the name and the text parameters
{{section|Fifth Link}}
displays as:
This is an example of text below the fifth link. This is probably the most common usage (no text parameter in the template)
See also
[edit]- {{anchor+}}