Template:InterwikiLink: Difference between revisions
Jump to navigation
Jump to search
MannedTooth (talk | contribs) No edit summary Tag: 2017 source edit |
Trig Jegman (talk | contribs) (& overhauled template to use on the interwiki templates. This avoids the use of the link template, which with fewer parser functions should be smoother. Not sure if my documentations any good. Might be better to have a dedicated link coloring template instead of having it in here, to fully nix parsers entirely...) |
||
Line 1: | Line 1: | ||
<includeonly>{ | <includeonly>[[{{{wikiprefix|mw}}}:{{{pagename|Main Page}}}|<span title="{{{title|{{{text|{{{pagename|}}} }}} }}}" style="{{#if:{{{color|}}}|color:{{{color|}}};|}} {{#if:{{{size|}}}|font-size:{{{size|}}}|}};">{{{text|{{{pagename|}}} }}}</span>]]</includeonly><noinclude> | ||
| | |||
| | |||
| | |||
}}}} | |||
== Usage == | == Usage == | ||
This is a base template for [[:Category:Interwiki links]] templates. Copy paste the following and fill out the <code>prefix</code> and <code>wikiname</code> | This is a base template for [[:Category:Interwiki links]] templates. Copy paste the following and fill out the <code>prefix</code> and <code>wikiname</code>. | ||
<pre style="width: 240px;"> | <pre style="width: 240px;"> | ||
{{InterwikiLink | {{InterwikiLink | ||
| | |wikiprefix = | ||
| | |pagename = | ||
| | |text = | ||
| | |title = | ||
}} | }} | ||
</pre> | </pre> | ||
{{Parameter| | {{Parameter|wikiprefix|The wiki's prefix in the [[Special:Interwiki|Interwiki table]]. This MUST be lowercase to work properly.|Required}} | ||
{{Parameter|pagename|The name of the page you wish to link to. Should be the optional first parameter as shown above. Defaults to the Main Page of the wiki.|Required}} | {{Parameter|pagename|The name of the page you wish to link to. Should be the optional first parameter as shown above. Defaults to the Main Page of the wiki.|Required}} | ||
{{Parameter|text|The text to show on the link. Should be the optional second parameter as shown above. If not provided, defaults to the <code>pagename</code>.| | {{Parameter|text|The text to show on the link. Should be the optional second parameter as shown above. If not provided, defaults to the <code>pagename</code>.|Optional}} | ||
{{Parameter|title|Change the hovertext of the link here. If not entered, displays <code>text</code>.|Optional}} | |||
<br clear=all> | |||
Additionally, links can be stylized with additional parameters: | |||
<pre style="width: 240px;"> | |||
{{InterwikiLink | |||
|wikiprefix = | |||
|pagename = | |||
|text = | |||
|title = | |||
|color = | |||
|size = | |||
}} | |||
</pre> | |||
{{Parameter|color|Change the color of the link. Can be hex or rgb.|Optional}} | |||
{{Parameter|size|Change the text size of the link.|Optional}} | |||
[[Category:Supporting templates]] | [[Category:Supporting templates]] | ||
</noinclude> | </noinclude> |
Revision as of 03:50, 26 April 2024
Usage
This is a base template for Category:Interwiki links templates. Copy paste the following and fill out the prefix
and wikiname
.
{{InterwikiLink |wikiprefix = |pagename = |text = |title = }}
- wikiprefix — The wiki's prefix in the Interwiki table. This MUST be lowercase to work properly.
- pagename — The name of the page you wish to link to. Should be the optional first parameter as shown above. Defaults to the Main Page of the wiki.
- text — The text to show on the link. Should be the optional second parameter as shown above. If not provided, defaults to the
pagename
. - title — Change the hovertext of the link here. If not entered, displays
text
.
Additionally, links can be stylized with additional parameters:
{{InterwikiLink |wikiprefix = |pagename = |text = |title = |color = |size = }}
- color — Change the color of the link. Can be hex or rgb.
- size — Change the text size of the link.