Template:Substance: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 66: | Line 66: | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude><includeonly>{{#if:{{{class|}}}|{{#set:Substance class={{{class|}}}}}}}{{#if:{{{prodrug_of|}}}|{{#set:Prodrug of={{{prodrug_of|}}}}}}}{{#if:{{{molar_mass|}}}|{{#set:Molar mass={{{molar_mass|}}}}}}}{{#if:{{{smiles|}}}|{{#set:SMILES={{{smiles|}}}}}}}{{#if:{{{iupac|}}}|{{#set:IUPAC name={{{iupac | </noinclude><includeonly>{{#if:{{{class|}}}|{{#set:Substance class={{{class|}}}}}}}{{#if:{{{prodrug_of|}}}|{{#set:Prodrug of={{{prodrug_of|}}}}}}}{{#if:{{{molar_mass|}}}|{{#set:Molar mass={{{molar_mass|}}}}}}}{{#if:{{{smiles|}}}|{{#set:SMILES={{{smiles|}}}}}}}{{#if:{{{iupac|}}}|{{#set:IUPAC name={{{iupac|}}}}}}}<table class="infobox-substance" style="float:right; clear:right; margin:0 0 1em 1.5em; width:280px; font-size:0.9em"> | ||
<tr><th colspan="2" class="infobox-substance__title">{{{name|{{PAGENAME}}}}}</th></tr> | <tr><th colspan="2" class="infobox-substance__title">{{{name|{{PAGENAME}}}}}</th></tr> | ||
{{#if:{{{image|}}}|<tr><td colspan="2" class="infobox-substance__image">[[File:{{{image}}}|250px|class=skin-invert-image|{{{image_caption|}}}]]</td></tr>{{#if:{{{image_caption|}}}|<tr><td colspan="2" class="infobox-substance__caption">{{{image_caption}}}</td></tr>}}}} | {{#if:{{{image|}}}|<tr><td colspan="2" class="infobox-substance__image">[[File:{{{image}}}|250px|class=skin-invert-image|{{{image_caption|}}}]]</td></tr>{{#if:{{{image_caption|}}}|<tr><td colspan="2" class="infobox-substance__caption">{{{image_caption}}}</td></tr>}}}} | ||
| Line 76: | Line 76: | ||
{{#if:{{{iupac|}}}|<tr><th>IUPAC name</th><td><small>{{{iupac}}}</small></td></tr>}} | {{#if:{{{iupac|}}}|<tr><th>IUPAC name</th><td><small>{{{iupac}}}</small></td></tr>}} | ||
{{#if:{{{smiles|}}}|<tr><th>SMILES</th><td><small style="word-break:break-all">{{{smiles}}}</small></td></tr>}} | {{#if:{{{smiles|}}}|<tr><th>SMILES</th><td><small style="word-break:break-all">{{{smiles}}}</small></td></tr>}} | ||
</table></includeonly> | </table></includeonly> | ||
Revision as of 16:02, 12 May 2026
Infobox for substance articles. Automatically annotates the page with Semantic MediaWiki properties.
Infobox for psychoactive substance articles.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name | Display name. Defaults to page name. | String | suggested |
| Image | image | Filename without the File: prefix. | File | suggested |
| Image caption | image_caption | no description | String | optional |
| Substance class | class | Pharmacological class, e.g. Benzodiazepine, Opioid, Stimulant. | String | suggested |
| Prodrug of | prodrug_of | Active substance this is a prodrug of (bare name, no namespace). | String | optional |
| Molecular formula | formula | Use <sub> tags for subscripts. | String | optional |
| Molar mass (g/mol) | molar_mass | no description | Number | optional |
| CAS number | cas | no description | String | optional |
| IUPAC name | iupac | no description | String | optional |
| SMILES | smiles | no description | String | optional |
| Legal status — Germany | legal_de | no description | String | optional |
| Legal status — Austria | legal_at | no description | String | optional |
| Legal status — Switzerland | legal_ch | no description | String | optional |
| Legal status — United States | legal_us | no description | String | optional |
| Legal status — United Kingdom | legal_uk | no description | String | optional |
| Legal status — Netherlands | legal_nl | no description | String | optional |
| Legal status — Russia | legal_ru | no description | String | optional |
| Legal status — Belarus | legal_by | no description | String | optional |