Difference between revisions of "User:Rogerb-on-NAO/monsymlink"

From NetHackWiki
Jump to navigation Jump to search
m (Finalise)
m (Undo revision 33259 by Rogerb-on-NAO (talk) Back to regular.)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>[[{{monarticle|{{{1}}}}}|{{{1}}}]]</includeonly></onlyinclude>
+
<onlyinclude><includeonly>{{#switch: {{{2|}}}
 
+
|after=[[{{monarticle|{{{1}}}}}|{{{1}}}]]&nbsp;
This template creates a link to a monster's page, using [[Template:monarticle]]. It takes one parameter, the monster name.
+
|only
 
+
|before
 +
|#default=
 +
}}[[{{monarticle|{{{1}}}}}|{{monsym|{{#replace: {{lc: {{{1}}}}}| |_}}}}]]{{#switch: {{{2|}}}
 +
|after
 +
|only=
 +
|before
 +
|#default=&nbsp;[[{{monarticle|{{{1}}}}}|{{{1}}}]]
 +
}}</includeonly></onlyinclude>
 +
This template shows the monster symbol and puts a link to that monster's page after it. Takes one or two parameters, the monster name, and an optional link type, which can be either <tt>before</tt>, <tt>after</tt> or  <tt>only</tt>. Uses <tt>before</tt> as the default type if the second parameter is missing.
 
For example:
 
For example:
*<nowiki>{{monlink|Wizard of Yendor}}</nowiki> produces {{monlink|Wizard of Yendor}}
 
  
This is a separate template to [[Template:Monsymlink]] to conserve resources.
+
*<nowiki>{{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor}}</nowiki> produces {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor}}
 +
*<nowiki>{{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|before}}</nowiki> produces {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|before}}
 +
*<nowiki>{{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|after}}</nowiki> produces {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|after}}
 +
*<nowiki>{{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|only}}</nowiki> produces {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|only}}

Latest revision as of 10:11, 20 June 2008

This template shows the monster symbol and puts a link to that monster's page after it. Takes one or two parameters, the monster name, and an optional link type, which can be either before, after or only. Uses before as the default type if the second parameter is missing. For example:

  • {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor}} produces @ Wizard of Yendor
  • {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|before}} produces @ Wizard of Yendor
  • {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|after}} produces Wizard of Yendor @
  • {{User:Rogerb-on-NAO/monsymlink|Wizard of Yendor|only}} produces @