Help:Link Templates
(Created page with "You can use templates to create inline text links to common types of pages. In most cases, it's a lot less typing! <br>For instance to link to the page for '''Spiked Shield''...") |
(change to include new Card Type link template; modified examples) |
||
(5 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=== | |
− | + | ||
− | + | The following table demonstrates how to use Card Hunter Wiki's link templates: | |
− | {| class="wikitable" | + | {| style="background: none" class="wikitable" |
− | ! To link to: | + | ! To link to: |
+ | ! Use: | ||
+ | ! Result: | ||
|- | |- | ||
! rowspan="2" | Cards | ! rowspan="2" | Cards | ||
− | | align="center" | < | + | | style="background: #f9f9f9" align="center" | <code><nowiki>{{Cards|xxxxxx}}</nowiki></code> |
− | ''or'' | + | ''or''<br> |
− | < | + | <code><nowiki>{{C|xxxxxx}}</nowiki></code> |
− | | A link to the page 'Cards/xxxxxx' that reads as "xxxxxx" | + | | style="background: #f9f9f9" | A link to the page 'Cards/xxxxxx' that reads as "xxxxxx" |
− | '' | + | ''Example: ''<code><nowiki>{{C|Bash}}</nowiki></code>'' gives ''{{C|Bash}} |
|- | |- | ||
− | | align="center" | < | + | | style="background: #f9f9f9" align="center" | <code><nowiki>{{Cards|xxxxxx|other text}}</nowiki></code> |
− | ''or'' | + | ''or''<br> |
− | < | + | <code><nowiki>{{C|xxxxxx|other text}}</nowiki></code> |
− | | A link to the page 'Cards/xxxxxx' that reads as "other text" | + | | style="background: #f9f9f9" | A link to the page 'Cards/xxxxxx' that reads as "other text" |
− | '' | + | ''Example: ''<code><nowiki>{{C|Arcing Zap|strange card}}</nowiki></code>'' gives ''{{C|Arcing Zap|strange card}} |
|- | |- | ||
! rowspan="2" | Items | ! rowspan="2" | Items | ||
− | | align="center" | < | + | | style="background: #f9f9f9" align="center" | <code><nowiki>{{Items|xxxxxx}}</nowiki></code> |
− | ''or'' | + | ''or''<br> |
− | < | + | <code><nowiki>{{I|xxxxxx}}</nowiki></code> |
− | | 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|Plain Old Boots}}</nowiki></code>'' gives ''{{I|Plain Old Boots}} |
|- | |- | ||
− | | align="center" | < | + | | style="background: #f9f9f9" align="center" | <code><nowiki>{{Items|xxxxxx|other text}}</nowiki></code> |
− | ''or'' | + | ''or''<br> |
− | < | + | <code><nowiki>{{I|xxxxxx|other text}}</nowiki></code> |
− | | A link to the page 'Items/xxxxxx' that reads as "other text" | + | | style="background: #f9f9f9" | A link to the page 'Items/xxxxxx' that reads as "other text" |
− | '' | + | ''Example: ''<code><nowiki>{{I|Copper Axe|sharp!}}</nowiki></code>'' gives ''{{I|Copper Axe|sharp!}} |
|- | |- | ||
! rowspan="2" | Keywords | ! rowspan="2" | Keywords | ||
− | | align="center" | < | + | | style="background: #f9f9f9" align="center" | <code><nowiki>{{Keywords|xxxxxx}}</nowiki></code> |
− | ''or'' | + | ''or''<br> |
− | < | + | <code><nowiki>{{K|xxxxxx}}</nowiki></code> |
− | | A link to the page 'Keywords | + | | style="background: #f9f9f9" | A link to the page section 'Keywords#xxxxxx' that reads as "xxxxxx" |
− | '' | + | ''Example: ''<code><nowiki>{{K|Cantrip}}</nowiki></code>'' gives ''{{K|Cantrip}} |
+ | | 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> | ||
+ | ''or''<br> | ||
+ | <code><nowiki>{{K|xxxxxx|other text}}</nowiki></code> | ||
+ | | style="background: #f9f9f9" | A link to the page section 'Keywords#xxxxxx' that reads as "other text" | ||
+ | ''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> | |
− | + | {{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 |
A link to the page 'Cards/xxxxxx' that reads as "xxxxxx"
Example: | |
{{Cards|xxxxxx|other text}}
or |
A link to the page 'Cards/xxxxxx' that reads as "other text"
Example: | ||
Items | {{Items|xxxxxx}}
or |
A link to the page 'Items/xxxxxx' that reads as "xxxxxx"
Example: | |
{{Items|xxxxxx|other text}}
or |
A link to the page 'Items/xxxxxx' that reads as "other text"
Example: | ||
Keywords | {{Keywords|xxxxxx}}
or |
A link to the page section 'Keywords#xxxxxx' that reads as "xxxxxx"
Example: |
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 |
A link to the page section 'Keywords#xxxxxx' that reads as "other text"
Example: | ||
Card Types (Attack types, Damage types) |
{{Types|xxxxxx}}
or |
A link to the page section 'Card Types#xxxxxx' that reads as "xxxxxx"
Example: |
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 |
A link to the page section 'Card Types#xxxxxx' that reads as "other text"
Example: | ||
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!) |