Template:linkbox

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(almost, but not quite right.)
(add support for oldhr links)
Line 1: Line 1:
-
<span class="hovul" style="font-size:smaller; background:#EEE; border:1px #999 solid; padding:2px; white-space:nowrap;">{{#ifeq:{{{3}}}|fullurl|{{p|l={{{1}}} {{{2|watch}}}}}|[[{{{3|HR}}}:{{{1}}}|{{{2|watch}}}]]}}</span><noinclude>
+
<span class="hovul" style="font-size:smaller; background:#EEE; border:1px #999 solid; padding:2px; white-space:nowrap;">
 +
{{#switch:{{{3}}}
 +
|fullurl={{p|l={{{1}}} {{{2|watch}}}}}
 +
|oldhr={{oldhr|{{{1}}}|{{{2|watch}}}}}
 +
|#default=[[{{{3|HR}}}:{{{1}}}|{{{2|watch}}}]]
 +
}}</span><noinclude>
Use this template to link directly to content in [[homestarrunner.com]] and related sites.  Simply copy the path of the filename and the desired label for the link ("watch" is the default label; "HR" is the default link style). If the link style given is "fullurl", a full url will be expected and linked to.  
Use this template to link directly to content in [[homestarrunner.com]] and related sites.  Simply copy the path of the filename and the desired label for the link ("watch" is the default label; "HR" is the default link style). If the link style given is "fullurl", a full url will be expected and linked to.  
Line 13: Line 18:
<code><nowiki>{{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}</nowiki></code>
<code><nowiki>{{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}</nowiki></code>
:produces: {{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}
:produces: {{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}
 +
<code><nowiki>{{linkbox|sbemail200.html|watch|oldhr}}</nowiki></code>
 +
:produces: {{linkbox|sbemail200.html|watch|oldhr}}
----
----
*See also: {{tl|watch}}
*See also: {{tl|watch}}

Revision as of 07:08, 20 January 2021

[[HR:{{{1}}}|watch]]

Use this template to link directly to content in homestarrunner.com and related sites. Simply copy the path of the filename and the desired label for the link ("watch" is the default label; "HR" is the default link style). If the link style given is "fullurl", a full url will be expected and linked to.

Examples:

{{linkbox|sbemail.html|listen}}

produces: listen

{{linkbox|rapsong.html}}

produces: watch

{{linkbox|hallrunner.html|play|Videlectrix}}

produces: play

{{linkbox|https://www.kickstarter.com/projects/1999933720/trogdor-the-board-game/|watch|fullurl}}

produces: watch

{{linkbox|sbemail200.html|watch|oldhr}}

produces: watch

Personal tools