Difference between revisions of "Template:Superlink"

From Twinsuniverse
Jump to: navigation, search
m (Examples)
m (Examples)
Line 31: Line 31:
  
 
:some text here <sup>&#91;[[Main Page|some link]]&#93;</sup>
 
:some text here <sup>&#91;[[Main Page|some link]]&#93;</sup>
 +
  
 
If the '''article''' parameter is not used, the superlink will render as ''italic'' text using only the '''label''' parameter:
 
If the '''article''' parameter is not used, the superlink will render as ''italic'' text using only the '''label''' parameter:
Line 36: Line 37:
  
 
:some text here <sup>&#91;''notice''&#93;</sup>
 
:some text here <sup>&#91;''notice''&#93;</sup>
 +
  
 
If the '''label''' parameter is not used, the superlink will render the link to the '''article''' without any custom text:
 
If the '''label''' parameter is not used, the superlink will render the link to the '''article''' without any custom text:
Line 41: Line 43:
  
 
:some text here <sup>&#91;[[Main Page]]&#93;</sup>
 
:some text here <sup>&#91;[[Main Page]]&#93;</sup>
 +
  
 
If no parameters are used, the superlink will render error text like this:
 
If no parameters are used, the superlink will render error text like this:
Line 46: Line 49:
  
 
:some text here <sup>&#91;'''''broken superlink'''''&#93;</sup>
 
:some text here <sup>&#91;'''''broken superlink'''''&#93;</sup>
 +
  
 
If the '''hide''' parameter is used (any non-empty value will do), the superlink will be hidden altogether:
 
If the '''hide''' parameter is used (any non-empty value will do), the superlink will be hidden altogether:

Revision as of 22:58, 11 November 2012

This template is used to create a link between superscript rectangle brackets, like: [this].

Parameters

  • article: the article page or category page to link to
  • label: the text to display on the link
  • hide: the result of the condition whether to hide the superlink

Syntax

{{superlink
 |article = 
 |label = 
 |hide = 
}}

Examples

Common use of the superlink include both article and label parameters:

some text here{{superlink|article = Main Page|label = some link}}
some text here [some link]


If the article parameter is not used, the superlink will render as italic text using only the label parameter:

some text here{{superlink|label = notice}}
some text here [notice]


If the label parameter is not used, the superlink will render the link to the article without any custom text:

some text here{{superlink|article = Main Page}}
some text here [Main Page]


If no parameters are used, the superlink will render error text like this:

some text here{{superlink}}
some text here [broken superlink]


If the hide parameter is used (any non-empty value will do), the superlink will be hidden altogether:

some text here{{superlink|article = Main Page|label = some link|hide=true}}
some text here

This could be useful somewhere on a page where a condition would determine whether you want to display a particular superlink there.