Difference between revisions of "Template:LinkForElement"

From blackwiki
Jump to navigation Jump to search
imported>Urhixidur
(positronium)
imported>Double sharp
Line 130: Line 130:
 
|cn|copernicium=copernicium
 
|cn|copernicium=copernicium
 
|uut|ununtrium=ununtrium
 
|uut|ununtrium=ununtrium
|uuq|ununquadium=ununquadium
+
|fl|flerovium=flerovium
 
|uup|ununpentium=ununpentium
 
|uup|ununpentium=ununpentium
|uuh|ununhexium=ununhexium
+
|lv|livermorium=livermorium
 
|uus|ununseptium=ununseptium
 
|uus|ununseptium=ununseptium
 
|uuo|ununoctium=ununoctium
 
|uuo|ununoctium=ununoctium
 
|#default = [[Category:Pages with incorrect nuclide templates use]]Error in [[Template:LinkForElement]]: unknown element {{{1}}}.
 
|#default = [[Category:Pages with incorrect nuclide templates use]]Error in [[Template:LinkForElement]]: unknown element {{{1}}}.
 
}}}}</includeonly>
 
}}}}</includeonly>

Revision as of 09:21, 2 June 2012

Template documentation[view] [edit] [history] [purge]

Template that returns the Wikipedia page for an element given its name or the Wikipedia page for an isotope given the element's name and its mass number.

Example usage

  • {{LinkForElement|Mercury}} will return "mercury (element)"
  • {{LinkForElement|Uranium|238}} will return "uranium-238"

When using a common name for an element that goes against the Wikipedia style guide for element names, a warning message will inform the editor about this. There are currently three such names:

  • {{LinkForElement|Aluminum}} will return "Aluminum is not a valid way to spell aluminium."
  • {{LinkForElement|Sulphur}} will return "Sulphur is not a valid way to spell sulfur."
  • {{LinkForElement|Cesium}} will return "Cesium is not a valid way to spell caesium."

Because the output of this script is expected to get used in a link and any error message this script outputs will also contain links, the error message will look corrupt. It is recommended that you use {{CheckElement}} to check that no error message will be output before using this template. If {{CheckElement}} returns an error message, you should output that error message instead.

See also

Template:Periodic table templates