Difference between revisions of "Template:Monsterlink"

From CrawlWiki
Jump to: navigation, search
(Use image without (monster) in second usage for simplicity and to synchronize with actual monster pages.)
(Add separate text parameter for plural cases)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{Glyph|{{{1|(monster)}}}}} [[Image:{{{2|{{{1}}}|(monster)}}}.png]] '''[[{{{1|monster}}}|{{{2|{{{1}}}}}}]]'''</includeonly><noinclude>
+
<includeonly>{{Glyph|{{{2|{{{1|(monster)}}}}}}}} [[Image:{{{1|(monster)}}}.png]] '''[[{{{1|monster}}}|{{{text|{{{2|{{{1}}}}}}}}}]]'''</includeonly><noinclude>
  
 
For example:  
 
For example:  
Line 7: Line 7:
 
gives you: {{monsterlink|Adder}}
 
gives you: {{monsterlink|Adder}}
  
You can specify the link text as the 2nd parameter (optional). For  example:
+
If name of the page about monster is different from the monster name for example it has ''(monster)'' in parentheses at the end, the following syntax could be used:
  
 
     <nowiki>{{monsterlink|Vampire (monster)|Vampire}}</nowiki>
 
     <nowiki>{{monsterlink|Vampire (monster)|Vampire}}</nowiki>
  
gives you: {{monsterlink|Vampire (monster)|Vampire}}
+
results in: {{monsterlink|Vampire (monster)|Vampire}}
 +
 
 +
If you only wish to have different text, for example for plural form of a monster's name, use 'text' parameter:
 +
 
 +
    <nowiki>{{monsterlink|Yak|text=Yaks}}</nowiki>
 +
 
 +
results in: {{monsterlink|Yak|text=Yaks}}
  
 
[[Category:Templates]]</noinclude>
 
[[Category:Templates]]</noinclude>

Latest revision as of 21:45, 16 June 2026


For example:

   {{monsterlink|Adder}}

gives you: S Adder.png Adder

If name of the page about monster is different from the monster name for example it has (monster) in parentheses at the end, the following syntax could be used:

   {{monsterlink|Vampire (monster)|Vampire}}

results in: V Vampire (monster).png Vampire

If you only wish to have different text, for example for plural form of a monster's name, use 'text' parameter:

   {{monsterlink|Yak|text=Yaks}}

results in: Y Yak.png Yaks