Template:Link: Difference between revisions

no edit summary
*>Monkey 05 06
mNo edit summary
*>Monkey 05 06
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[{{{1}}}#{{qif|test={{{2|}}}|then={{{2}}}}}|{{qif|test={{{3|}}}|then={{{3}}}|else={{qif|test={{{2|}}}|then={{{2}}}|else={{{1}}}}}}}]]</includeonly>
<includeonly>[[{{{1}}}#{{{2|}}}|{{{3|{{{2|{{{1}}}}}}}}}]]</includeonly><noinclude>==About==
This template is used to simplify creating wiki links. It is used as
 
  <nowiki>{{link|PAGE_TITLE|ANCHOR|ALT_TEXT}}</nowiki>
 
All parameters ''except'' PAGE_TITLE ''or'' ANCHOR are optional (at least one of the two must be supplied). The last specified parameter will be used as the link text. So if only PAGE_TITLE is specified:
 
  <nowiki>{{link|Adventure Game Studio}}</nowiki>
 
You would get the link:
 
&nbsp;&nbsp;&nbsp;&nbsp;[[Adventure Game Studio]]
 
ANCHOR allows you to specifically link to a subsection of an article while using the subsection's title as the link text. That is:
 
  <nowiki>{{link|Adventure Game Studio|History}}</nowiki>
 
Would yield the following link:
 
&nbsp;&nbsp;&nbsp;&nbsp;[[Adventure Game Studio#History|History]]
 
ALT_TEXT does as it implies and wllows you to change the text used in the link. So you could do this:
 
  <nowiki>{{link|Adventure Game Studio|History|AGS History}}</nowiki>
 
To produce the following link:
 
&nbsp;&nbsp;&nbsp;&nbsp;[[Adventure Game Studio#History|AGS History]]
 
You can still specify ALT_TEXT without specifying an ANCHOR as well:
 
  <nowiki>{{link|Adventure Game Studio||AGS}}</nowiki>
 
Gives the link:
 
&nbsp;&nbsp;&nbsp;&nbsp;[[Adventure Game Studio|AGS]]
 
Another great use is to link to a subsection of the current page:
 
  <nowiki>{{link||About}}</nowiki>
 
Which produces this:
 
&nbsp;&nbsp;&nbsp;&nbsp;[[#About|About]]
 
Or even:
 
  <nowiki>{{link||About|Top}}</nowiki>
 
Which gives:
 
&nbsp;&nbsp;&nbsp;&nbsp;[[#About|Top]]
 
[[Category:Formatting templates]]</noinclude>
Anonymous user