Jump to content

Template:Anc

From DynamicPageList3 Manual
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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
11

Enter the anchor name, avoiding special characters not mentioned.

Stringrequired
22

Enter any (optional) display text to show.

Stringoptional


Cookies help us deliver our services. By using our services, you agree to our use of cookies.