Template:Softredirect: Difference between revisions

(Fix)
(Instructions go into the /doc subpage and {{doc}} template)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
 
<div style="float:left;border:1px solid #000;padding:5px 10px;">
Click this link to go to<br />
Click this link to go to<br />


[[Image:SoftRedirect.png]]<span class="redirectText">[[{{{1}}}:{{{2|{{PAGENAME}}}}}|{{{2|{{PAGENAME}}}}}]]</span><br />
[[Image:SoftRedirect.png]]<span class="redirectText">[[{{{1}}}:{{{2|{{PAGENAME}}}}}|{{{2|{{PAGENAME}}}}}]]</span><br />


on [[{{{1}}}:|{{#if: {{{3|}}} | {{{3}}} | {{#ifeq: {{{1|}}} | igwn | Independent Gaming Wiki Network}}{{#ifeq: {{{1|}}} | gtm | Grand Theft Mods}}}}]].
on [[{{{1}}}:|{{#if: {{{3|}}} | {{{3}}} | {{#ifeq: {{{1|}}} | igwn | Independent Gaming Wiki Network}}{{#ifeq: {{{1|}}} | gtm | Grand Theft Mods}}{{#ifeq: {{{1|}}} | mods | Grand Theft Mods}}}}]].
 
</div><br style="clear:both;" />
[[Category:Soft Redirects]]
</includeonly>
</includeonly>
<noinclude>
<noinclude>
This template is used for creating soft redirects to [[igwn:|Independent Gaming Wiki Network]] and [[mods:|Grand Theft Mods]]. The usual redirect syntax <code><nowiki>#REDIRECT [[mods:PAGE NAME]]</nowiki></code> doesn't work for interwiki redirects, so this template provides a clickable link instead.
{{doc}}
 
To use this template, use the following format:
 
<code><nowiki>{{softredirect|interwiki code|page name}}</nowiki></code>
 
In the above example code, <code>interwiki code</code> refers to the prefix used for linking to the destination wiki. For IGWN this is <code>igwn</code> and for Grand Theft Mods it is <code>gtm</code>. This code should NOT include the colon (<code>:</code>)
 
In addition, <code>page name</code> refers to the name of the destination article on that wiki.
 
For example, to link to GTM's [[gtm:Modifications|Modifications]] page, use the following code:
 
<code><nowiki>{{softredirect|gtm|Modifications}}</nowiki></code>
 
This code produces the following:
 
<div style="float:left;border:1px solid #000;padding:5px 10px;">
{{softredirect|gtm|Modifications}}
</div><br style="clear:both;" />
 
If the destination page on the other wiki has the same name as the page being redirected, the page name can be omitted. For example:
 
<code><nowiki>{{softredirect|gtm}}</nowiki></code>
 
This code produces the following:
 
<div style="float:left;border:1px solid #000;padding:5px 10px;">
{{softredirect|gtm|Modifications}}
</div><br style="clear:both;" />
 
If you're using this template to link to a wiki besides IGWN or GTM, a third parameter can be added to manually specify the name of the wiki. For example:
 
<code><nowiki>{{softredirect|wp|Mod (video gaming)|Wikipedia}}</nowiki></code>
 
That code will produce a link to [[wp:Mod (video gaming)|Mod (video gaming]] on Wikipedia (because <code>wp</code> is the interwiki code used for Wikipedia). The thrd parameter, "Wikipedia", is used to provide the name of the wiki. This code will produce the following:
 
<div style="float:left;border:1px solid #000;padding:5px 10px;">
{{softredirect|wp|Mod (video gaming)|Wikipedia}}
</div><br style="clear:both;" />
 
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 07:39, 11 January 2012


This documentation is imported from Template:Softredirect/doc

This template is used for creating soft redirects to Independent Gaming Wiki Network and Grand Theft Mods. The usual redirect syntax #REDIRECT [[mods:PAGE NAME]] doesn't work for interwiki redirects, so this template provides a clickable link instead.

To use this template, use the following format:

{{softredirect|interwiki code|page name}}

In the above example code, interwiki code refers to the prefix used for linking to the destination wiki. For IGWN this is igwn and for Grand Theft Mods it is gtm. This code should NOT include the colon (:)

In addition, page name refers to the name of the destination article on that wiki.

For example, to link to GTM's Modifications page, use the following code:

{{softredirect|gtm|Modifications}}

This code produces the following:


Click this link to go to

Modifications

on Grand Theft Mods.



If the destination page on the other wiki has the same name as the page being redirected, the page name can be omitted. For example:

{{softredirect|gtm}}

This code produces the following:


Click this link to go to

Modifications

on Grand Theft Mods.



If you're using this template to link to a wiki besides IGWN or GTM, a third parameter can be added to manually specify the name of the wiki. For example:

{{softredirect|wp|Mod (video gaming)|Wikipedia}}

That code will produce a link to Mod (video gaming on Wikipedia (because wp is the interwiki code used for Wikipedia). The thrd parameter, "Wikipedia", is used to provide the name of the wiki. This code will produce the following:


Click this link to go to

Mod (video gaming)

on Wikipedia.