Difference between revisions of "Template:JKR/doc"

From blackwiki
Jump to navigation Jump to search
imported>Johnuniq
(optional second parameter: svg, png, text)
imported>Vanisaac
m (→‎Specifying output: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
Line 19: Line 19:
 
*<code><nowiki>{{JKR|1|text}}</nowiki></code> → {{JKR|1|text}}
 
*<code><nowiki>{{JKR|1|text}}</nowiki></code> → {{JKR|1|text}}
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
[[Category:Malaysia expressway and road infobox templates]]
 
[[Category:Malaysia expressway and road infobox templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 22:54, 25 April 2020

This template displays the route marker for Malaysian roads given the route number. If the proper image does not exist on this wiki or Wikimedia Commons, the template will display the route number in italics until the image is uploaded. This template does not currently work for expressway routes and will display an error instead.

Examples

  • {{JKR|1}}Jkr-ft1.png
  • {{JKR|9999}}9999
  • {{JKR|P1}}P1
  • {{JKR|E40}}Wrong template: use {{MES-E|route number without "E"}}

Specifying output

Some pages (example) use this template many times. To avoid errors due to the large number of expensive function calls to test which images exist, an optional second parameter can be added:

  • svg to use the svg image
  • png to use the png image
  • text to use italic text

Examples:

  • {{JKR|1|svg}}Jkr-ft1.svg
  • {{JKR|1|png}}Jkr-ft1.png
  • {{JKR|1|text}}1