Help:Link Templates

From Card Hunter Wiki
(Difference between revisions)
Jump to: navigation, search
(corrections to new Keywords format, and sneaky color trick)
(change to include new Card Type link template; modified examples)
 
(2 intermediate revisions by one user not shown)
Line 6: Line 6:
 
<br>Both options have the result {{I|Spiked Shield}}. Which one do you think is faster?
 
<br>Both options have the result {{I|Spiked Shield}}. Which one do you think is faster?
  
====Table of Link Templates====
+
===Table of Link Templates===
  
 
The following table demonstrates how to use Card Hunter Wiki's link templates:
 
The following table demonstrates how to use Card Hunter Wiki's link templates:
Line 32: Line 32:
 
<code><nowiki>{{I|xxxxxx}}</nowiki></code>
 
<code><nowiki>{{I|xxxxxx}}</nowiki></code>
 
| style="background: #f9f9f9" | A link to the page 'Items/xxxxxx' that reads as "xxxxxx"
 
| style="background: #f9f9f9" | A link to the page 'Items/xxxxxx' that reads as "xxxxxx"
''Example: ''<code><nowiki>{{I|Cloth Cap}}</nowiki></code>'' gives ''{{I|Cloth Cap}}
+
''Example: ''<code><nowiki>{{I|Plain Old Boots}}</nowiki></code>'' gives ''{{I|Plain Old Boots}}
 
|-
 
|-
 
| style="background: #f9f9f9" align="center" | <code><nowiki>{{Items|xxxxxx|other text}}</nowiki></code>
 
| style="background: #f9f9f9" align="center" | <code><nowiki>{{Items|xxxxxx|other text}}</nowiki></code>
Line 45: Line 45:
 
<code><nowiki>{{K|xxxxxx}}</nowiki></code>
 
<code><nowiki>{{K|xxxxxx}}</nowiki></code>
 
| style="background: #f9f9f9" | A link to the page section 'Keywords#xxxxxx' that reads as "xxxxxx"
 
| style="background: #f9f9f9" | A link to the page section 'Keywords#xxxxxx' that reads as "xxxxxx"
''Example: ''<code><nowiki>{{K|Holy}}</nowiki></code>'' gives ''{{K|Holy}}
+
''Example: ''<code><nowiki>{{K|Cantrip}}</nowiki></code>'' gives ''{{K|Cantrip}}
| rowspan="2" style="background: #f9f9f9" | The [[Template:Keywords|Keywords]] and [[Template:K|K]] templates will show a valid link to <br/>the [[Keywords]] page even if the 'xxxxxx' anchor does not <br/>exist. Please check your links are working correctly.  
+
| rowspan="2" style="background: #f9f9f9" | [[Template:Keywords]] and [[Template:K]] will show a valid link <br/>to the [[Keywords]] page even if the 'xxxxxx' anchor does not <br/>exist. Please check your links are working correctly.  
 
|-
 
|-
 
| style="background: #f9f9f9" align="center" | <code><nowiki>{{Keywords|xxxxxx|other text}}</nowiki></code>
 
| style="background: #f9f9f9" align="center" | <code><nowiki>{{Keywords|xxxxxx|other text}}</nowiki></code>
Line 52: Line 52:
 
<code><nowiki>{{K|xxxxxx|other text}}</nowiki></code>
 
<code><nowiki>{{K|xxxxxx|other text}}</nowiki></code>
 
| style="background: #f9f9f9" | A link to the page section 'Keywords#xxxxxx' that reads as "other text"
 
| style="background: #f9f9f9" | A link to the page section 'Keywords#xxxxxx' that reads as "other text"
''Example: ''<code><nowiki>{{K|Poison|Poison 2}}</nowiki></code>'' gives ''{{K|Poison|Poison 2}}
+
''Example: ''<code><nowiki>{{K|Step|Step 2}}</nowiki></code>'' gives ''{{K|Step|Step 2}}
 +
|-
 +
! rowspan="2" | Card Types<br/> (Attack types, <br/> Damage types)
 +
| style="background: #f9f9f9" align="center" | <code><nowiki>{{Types|xxxxxx}}</nowiki></code>
 +
''or''<br>
 +
<code><nowiki>{{T|xxxxxx}}</nowiki></code>
 +
| style="background: #f9f9f9" | A link to the page section 'Card Types#xxxxxx' that reads as "xxxxxx"
 +
''Example: ''<code><nowiki>{{T|Holy}}</nowiki></code>'' gives ''{{T|Holy}}
 +
| rowspan="2" style="background: #f9f9f9" | [[Template:Types]] and [[Template:T]] will show a valid link <br/>to the [[Card Types]] page even if the 'xxxxxx' anchor does <br/>not exist. Please check your links are working correctly.
 +
|-
 +
| style="background: #f9f9f9" align="center" | <code><nowiki>{{Types|xxxxxx|other text}}</nowiki></code>
 +
''or''<br>
 +
<code><nowiki>{{T|xxxxxx|other text}}</nowiki></code>
 +
| style="background: #f9f9f9" | A link to the page section 'Card Types#xxxxxx' that reads as "other text"
 +
''Example: ''<code><nowiki>{{T|Electrical|lightning}}</nowiki></code>'' gives ''{{T|Electrical|lightning}}
 
|-
 
|-
 
! colspan="3" | Important! Capital letters count when making links. {{C|Bash}} is not the same as {{C|bash}}.<br>
 
! colspan="3" | Important! Capital letters count when making links. {{C|Bash}} is not the same as {{C|bash}}.<br>
{{I|Cloth Cap|Cozy headgear}} is not the same as {{I|cloTH caP|Cozy headgear}} (Mouse over to check the link!)
+
{{I|Plain Old Boots|Cozy footwear}} is not the same as {{I|plAIn oLd BOOts|Cozy footwear}} (Mouse over to check the link!)
 
|}
 
|}

Latest revision as of 19:21, 17 January 2013

You can use templates to create inline text links to common types of pages. In most cases, it's a lot less typing!
For instance to link to the page for Spiked Shield, I could type
[[Items/Spiked Shield|Spiked Shield]]
or I could type
{{I|Spiked Shield}}
Both options have the result Spiked Shield. Which one do you think is faster?

[edit] Table of Link Templates

The following table demonstrates how to use Card Hunter Wiki's link templates:

To link to: Use: Result:
Cards {{Cards|xxxxxx}}

or
{{C|xxxxxx}}

A link to the page 'Cards/xxxxxx' that reads as "xxxxxx"

Example: {{C|Bash}} gives Bash

{{Cards|xxxxxx|other text}}

or
{{C|xxxxxx|other text}}

A link to the page 'Cards/xxxxxx' that reads as "other text"

Example: {{C|Arcing Zap|strange card}} gives strange card

Items {{Items|xxxxxx}}

or
{{I|xxxxxx}}

A link to the page 'Items/xxxxxx' that reads as "xxxxxx"

Example: {{I|Plain Old Boots}} gives Plain Old Boots

{{Items|xxxxxx|other text}}

or
{{I|xxxxxx|other text}}

A link to the page 'Items/xxxxxx' that reads as "other text"

Example: {{I|Copper Axe|sharp!}} gives sharp!

Keywords {{Keywords|xxxxxx}}

or
{{K|xxxxxx}}

A link to the page section 'Keywords#xxxxxx' that reads as "xxxxxx"

Example: {{K|Cantrip}} gives Cantrip

Template:Keywords and Template:K will show a valid link
to the Keywords page even if the 'xxxxxx' anchor does not
exist. Please check your links are working correctly.
{{Keywords|xxxxxx|other text}}

or
{{K|xxxxxx|other text}}

A link to the page section 'Keywords#xxxxxx' that reads as "other text"

Example: {{K|Step|Step 2}} gives Step 2

Card Types
(Attack types,
Damage types)
{{Types|xxxxxx}}

or
{{T|xxxxxx}}

A link to the page section 'Card Types#xxxxxx' that reads as "xxxxxx"

Example: {{T|Holy}} gives Holy

Template:Types and Template:T will show a valid link
to the Card Types page even if the 'xxxxxx' anchor does
not exist. Please check your links are working correctly.
{{Types|xxxxxx|other text}}

or
{{T|xxxxxx|other text}}

A link to the page section 'Card Types#xxxxxx' that reads as "other text"

Example: {{T|Electrical|lightning}} gives lightning

Important! Capital letters count when making links. Bash is not the same as bash.

Cozy footwear is not the same as Cozy footwear (Mouse over to check the link!)

      
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Tools