Template:R to anchor: Difference between revisions

Safer nicotine wiki Tobacco Harm Reduction
Jump to navigation Jump to search
m (1 revision imported: Wikipedia article on Nicotine templates needed)
(→‎top: Mention {{visible anchor}} per User:Pokechu22's request, though more concise.)
Line 5: Line 5:
   |from=a topic that does not have its own page
   |from=a topic that does not have its own page
   |to=an [[Help:Link#Specifics|embedded anchor]] on the redirect's target page
   |to=an [[Help:Link#Specifics|embedded anchor]] on the redirect's target page
   |info=** An {{tlx|anchor|(anchor name)}} template, a <code><nowiki><span id=</nowiki>"(anchor name)"></code> [[HTML element#Anchor|html element]], or an {{para|id|(anchor name)}} parameter might be installed at the beginning of a paragraph, in or near a section header or within a [[Help:table|table]].  The anchor might also be an old section header that has been edited and is anchored within or near the new header to prevent broken internal and external links.
   |info=** An {{tlx|anchor|(anchor name)}} or {{tlx|visible anchor}} template, a [[HTML element#Anchor|HTML element with <code>id="(anchor name)"</code>]], or an {{para|id|(anchor name)}} parameter might be installed at the beginning of a paragraph, in or near a section header or within a [[Help:table|table]].  The anchor might also be an old section header that has been edited and is anchored within or near the new header to prevent broken internal and external links.
** Even though section headers of the general form <code>==(Header name)==</code> are themselves a type of anchor, use {{tl|R to section}} ''instead''.
** Even though section headers of the general form <code>==(Header name)==</code> are themselves a type of anchor, use {{tl|R to section}} ''instead''.
   |all category=Redirects to embedded anchors
   |all category=Redirects to embedded anchors
  |printworthy={{#ifeq:{{{1}}}|printworthy|yes}}
}}<noinclude>
}}<noinclude>
<!-- Place categories on /doc subpage; interwikis go to Wikidata. -->
<!-- Place categories on /doc subpage; interwikis go to Wikidata. -->
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Revision as of 21:50, 3 October 2021

When used with the "Redirect category shell" (Rcat shell) template:

Template {{Redirect category shell}} may be used to add one or more rcat templates, along with their parameters and categories, to a redirect. For more information see the documentation page below.

When used by itself:

  • To an embedded anchor: This is a redirect from a topic that does not have its own page to an embedded anchor on the redirect's target page.
    • An {{anchor|(anchor name)}} or {{visible anchor}} template, a HTML element with id="(anchor name)", or an |id=(anchor name) parameter might be installed at the beginning of a paragraph, in or near a section header or within a table. The anchor might also be an old section header that has been edited and is anchored within or near the new header to prevent broken internal and external links.
    • Even though section headers of the general form ==(Header name)== are themselves a type of anchor, use {{R to section}} instead.