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|}}}}}}}{{#if:{{{legal_de|}}}|{{#set:Legal status DE={{{legal_de|}}}}}}}{{#if:{{{legal_at|}}}|{{#set:Legal status AT={{{legal_at|}}}}}}}{{#if:{{{legal_ch|}}}|{{#set:Legal status CH={{{legal_ch|}}}}}}}{{#if:{{{legal_us|}}}|{{#set:Legal status US={{{legal_us|}}}}}}}{{#if:{{{legal_uk|}}}|{{#set:Legal status UK={{{legal_uk|}}}}}}}{{#if:{{{legal_nl|}}}|{{#set:Legal status NL={{{legal_nl|}}}}}}}{{#if:{{{legal_ru|}}}|{{#set:Legal status RU={{{legal_ru|}}}}}}}{{#if:{{{legal_by|}}}|{{#set:Legal status BY={{{legal_by|}}}}}}} | </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|}}}}}}}{{#if:{{{legal_de|}}}|{{#set:Legal status DE={{{legal_de|}}}}}}}{{#if:{{{legal_at|}}}|{{#set:Legal status AT={{{legal_at|}}}}}}}{{#if:{{{legal_ch|}}}|{{#set:Legal status CH={{{legal_ch|}}}}}}}{{#if:{{{legal_us|}}}|{{#set:Legal status US={{{legal_us|}}}}}}}{{#if:{{{legal_uk|}}}|{{#set:Legal status UK={{{legal_uk|}}}}}}}{{#if:{{{legal_nl|}}}|{{#set:Legal status NL={{{legal_nl|}}}}}}}{{#if:{{{legal_ru|}}}|{{#set:Legal status RU={{{legal_ru|}}}}}}}{{#if:{{{legal_by|}}}|{{#set:Legal status BY={{{legal_by|}}}}}}}<table class="wikitable infobox-substance"> | ||
<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|}}}| | {{#if:{{{class|}}}|<tr><th>Class</th><td>[[{{{class}}}]]</td></tr>}} | ||
{{#if:{{{prodrug_of|}}}|<tr><th>Prodrug of</th><td>[[Substance:{{{prodrug_of}}}|{{{prodrug_of}}}]]</td></tr>}} | |||
{{#if:{{{formula|}}}|<tr><th>Formula</th><td>{{{formula}}}</td></tr>}} | |||
{{#if:{{{image_caption|}}}| | {{#if:{{{molar_mass|}}}|<tr><th>Molar mass</th><td>{{{molar_mass}}} g/mol</td></tr>}} | ||
{{#if:{{{cas|}}}|<tr><th>CAS number</th><td>{{{cas}}}</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:{{{legal_de|}}}{{{legal_at|}}}{{{legal_ch|}}}{{{legal_us|}}}{{{legal_uk|}}}{{{legal_nl|}}}{{{legal_ru|}}}{{{legal_by|}}}|<tr><th colspan="2" class="infobox-substance__section">Legal status</th></tr>}} | ||
{{#if:{{{class|}}}| | {{#if:{{{legal_de|}}}|<tr><th>Germany</th><td>{{{legal_de}}}</td></tr>}} | ||
{{#if:{{{legal_at|}}}|<tr><th>Austria</th><td>{{{legal_at}}}</td></tr>}} | |||
{{#if:{{{legal_ch|}}}|<tr><th>Switzerland</th><td>{{{legal_ch}}}</td></tr>}} | |||
{{#if:{{{legal_us|}}}|<tr><th>United States</th><td>{{{legal_us}}}</td></tr>}} | |||
}} | {{#if:{{{legal_uk|}}}|<tr><th>United Kingdom</th><td>{{{legal_uk}}}</td></tr>}} | ||
{{#if:{{{prodrug_of|}}}| | {{#if:{{{legal_nl|}}}|<tr><th>Netherlands</th><td>{{{legal_nl}}}</td></tr>}} | ||
{{#if:{{{legal_ru|}}}|<tr><th>Russia</th><td>{{{legal_ru}}}</td></tr>}} | |||
{{#if:{{{legal_by|}}}|<tr><th>Belarus</th><td>{{{legal_by}}}</td></tr>}} | |||
</table></includeonly> | |||
}} | |||
{{#if:{{{formula|}}}| | |||
}} | |||
{{#if:{{{molar_mass|}}}| | |||
}} | |||
{{#if:{{{cas|}}}| | |||
}} | |||
{{#if:{{{iupac|}}}| | |||
}} | |||
{{#if:{{{smiles|}}}| | |||
}} | |||
{{#if:{{{legal_de|}}}{{{legal_at|}}}{{{legal_ch|}}}{{{legal_us|}}}{{{legal_uk|}}}{{{legal_nl|}}}{{{legal_ru|}}}{{{legal_by|}}}| | |||
}} | |||
{{#if:{{{legal_de|}}}| | |||
}} | |||
{{#if:{{{legal_at|}}}| | |||
}} | |||
{{#if:{{{legal_ch|}}}| | |||
}} | |||
{{#if:{{{legal_us|}}}| | |||
}} | |||
{{#if:{{{legal_uk|}}}| | |||
}} | |||
{{#if:{{{legal_nl|}}}| | |||
}} | |||
{{#if:{{{legal_ru|}}}| | |||
}} | |||
{{#if:{{{legal_by|}}}| | |||
}} | |||
Revision as of 14:20, 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 |