A Wiki in the Desert
Log in

Difference between revisions of "Template:Link"

From A Wiki in the Desert
(Created template)
 
m (Moving docs to /doc subpage)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>''Creates a Link''
+
<includeonly>[[{{{1}}}{{#ifeq:{{{2|}}}.|.||/{{{2}}}}}|{{#ifeq:{{{3|}}}.|.|{{#ifeq:{{{2|}}}.|.|{{{1}}}|{{{2}}}}}|{{{3}}}}}]]
 
 
Usage:
 
: '''<NOWIKI>{{link| Page To Link To}}</NOWIKI>'''
 
: '''<NOWIKI>{{link| Sub Page | Main Page Name }}</NOWIKI>'''
 
: '''<NOWIKI>{{link| Sub Page | Main Page Name | Link Label }}</NOWIKI>'''
 
: '''<NOWIKI>{{link| Page To Link To || Link Label }}</NOWIKI>''' (note the double pipe || between the two sets of data)
 
 
 
Example:
 
* <NOWIKI>{{link | Research }}</NOWIKI> produces:
 
: {{link | Research }}
 
: The page linked to is Research, the label is Research
 
* <NOWIKI>{{link | Research | Region}}</NOWIKI> produces:
 
: {{link |Research|Region}}
 
: The page linked to is Research/Region, the label is just Region
 
* <NOWIKI>{{link | Research | Region | LinkDescription}}</NOWIKI> produces:
 
: {{link |Research|Region|LinkDescription}}
 
: The page linked to is Research/Region, the link label name is LinkDescription
 
* <NOWIKI>{{link | Research || LinkDescription}}</NOWIKI> produces:
 
: {{link |Research||LinkDescription}}
 
: The page linked to is Research, the link label name is LinkDescription
 
 
 
 
 
----
 
</noinclude><includeonly>[[{{{1}}}{{#ifeq:{{{2|}}}.|.||/{{{2}}}}}|{{#ifeq:{{{3|}}}.|.|{{#ifeq:{{{2|}}}.|.|{{{1}}}|{{{2}}}}}|{{{3}}}}}]]
 
 
</includeonly><noinclude>
 
</includeonly><noinclude>
[[Category: Template]] {{DEFAULTSORT:{{SUBPAGENAME}}}}
+
{{Documentation}}
 +
[[Category:Utility templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 15:59, 17 May 2021

Template documentation (for the above template, sometimes hidden or invisible)

Creates a Link

Usage:

{{link| Page To Link To}}
{{link| Sub Page | Main Page Name }}
{{link| Sub Page | Main Page Name | Link Label }}
{{link| Page To Link To || Link Label }} (note the double pipe || between the two sets of data)

Example:

  • {{link | Research }} produces:
Research
The page linked to is Research, the label is Research
  • {{link | Research | Region}} produces:
Region
The page linked to is Research/Region, the label is just Region
  • {{link | Research | Region | LinkDescription}} produces:
LinkDescription
The page linked to is Research/Region, the link label name is LinkDescription
  • {{link | Research || LinkDescription}} produces:
LinkDescription
The page linked to is Research, the link label name is LinkDescription

Visit Template:Link/doc to edit this text! (How does this work?)