Template:Anc
Appearance
| Template documentation |
|---|
| Note: portions of the template sample may not be visible without values provided. |
| View or edit this template's documentation (edit) (about template documentation). |
No TemplateStyles exist (create). Remember to add after the opening <includeonly> tag:
|
<templatestyles src="Template:Anc/styles.css" />
|
Example(s)
[edit source]Place one of the following on the page where you'd like to be able to link to directly:
{{anc|anchorname}}- displays no text, just creates a hidden anchor.{{anc|anchor name}}- displays no text, just creates a hidden anchor, but replaces spaces with dashes.{{anc|anchor name|anchor text}}- anchors to specific text allowing override text to be displayed, which gives (note, web inspector can be used to inspect the result to see the anchor):
anchor text
- For the above, the web inspector should show
<span id="anchor-name">anchor text</span>.
Important notes:
- Spaces cannot be used in anchor names (they are automatically replaced by dashes).
- Only these symbols can be used in an anchor name: hyphen
-, underscore_, colon:, period. - To link to the anchor, use
{{Anchor}}, or alternatively you could link to it manually with:[[Pagename#anchorname]]to cause the link to jump to the anchor.
See Also
[edit source]{{Anchor}}, the partner template to this one, used to link to auto-formatted anchors in a similar matter.
Template Data
[edit source]Creates an anchor (ornamed anchors) element on a page to link to, outside of MediaWiki's section anchors so it doesn't interfere with MediaWiki's built-in heading/Table of Contents anchors, which use uppercase for the first letter.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| 1 | 1 | Enter the anchor name, avoiding special characters not mentioned. | String | required |
| 2 | 2 | Enter any (optional) display text to show. | String | optional |