Template:movinganchor

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
m (Usage: Reword.)
(autoreplace: — → {{--}})
 
(includes 9 intermediate revisions)
Line 1: Line 1:
-
{{#ifexist:{{{1}}}|{{{1}}}#{{{3}}}|{{{2}}}#{{{3}}}}}<noinclude>
+
{{#ifexist:{{{1}}}|{{{1}}}|{{{2}}}}}{{#if:{{{3|}}}|&#35;{{{3}}}|}}<noinclude>
----
----
=== Usage ===
=== Usage ===
-
Links to current, specific sections on pages like [[Talk:Main Page]] will break after that content has been archived as usually done. In order for these links to work for future readers, use this template rather than a hard-coded link.
+
Links to current, specific sections on pages like [[Talk:Main Page]] will break after that content has been archived as usually done. In order for these links to work for future readers, create the link using this template rather than hard-coding it.
=== Syntax ===
=== Syntax ===
*<code><nowiki>{{movinganchor|archive|current|anchor}}</nowiki></code>
*<code><nowiki>{{movinganchor|archive|current|anchor}}</nowiki></code>
-
**<code>archive</code> &mdash; The page where <code>anchor</code> will be archived in the future.
+
**<code>archive</code> {{--}} The page where <code>anchor</code> will be archived in the future.
-
**<code>current</code> &mdash; The current page where <code>anchor</code> resides.
+
**<code>current</code> {{--}} The current page where <code>anchor</code> resides.
-
**<code>anchor</code> &mdash; The section/anchor name.
+
**<code>anchor</code> {{--}} The section/anchor name. ''(Optional)''
=== Example ===
=== Example ===
-
*<code><nowiki>[[{{{movinganchor|HRWiki:Main Page Talk Archive 40|Talk:Main Page|Wiki image}}]]</nowiki></code> &rarr; [[{{movinganchor|HRWiki:Main Page Talk Archive 40|Talk:Main Page|Wiki image}}]]
+
*<code><nowiki>[[{{movinganchor|HRWiki:Main Page Talk Archive 40|Talk:Main Page|Featured Article (DNA Evidence) Typo}}]]</nowiki></code> &rarr; [[{{movinganchor|HRWiki:Main Page Talk Archive 40|Talk:Main Page|Featured Article (DNA Evidence) Typo}}]]
 +
*<code><nowiki>[[{{movinganchor|HRWiki:Main Page Talk Archive 1987|Talk:Main Page}}]]</nowiki></code> &rarr; [[{{movinganchor|HRWiki:Main Page Talk Archive 1987|Talk:Main Page}}]]
-
[[Category:Formatting Templates]]
+
[[Category:Internal link templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Current revision as of 04:13, 4 November 2022

{{{2}}}


[edit] Usage

Links to current, specific sections on pages like Talk:Main Page will break after that content has been archived as usually done. In order for these links to work for future readers, create the link using this template rather than hard-coding it.

[edit] Syntax

  • {{movinganchor|archive|current|anchor}}
    • archive — The page where anchor will be archived in the future.
    • current — The current page where anchor resides.
    • anchor — The section/anchor name. (Optional)

[edit] Example

Personal tools