Template:Substance: Difference between revisions
Template page
More actions
No edit summary |
Automated sync |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<!-- This file is managed by the altered-wiki-src repository. Do not edit it directly on the wiki — changes will be overwritten on the next deploy. https://github.com/altered-wiki/altered-wiki-src --> | |||
Infobox for substance articles. Automatically annotates the page with Semantic MediaWiki properties. | Infobox for substance articles. Automatically annotates the page with Semantic MediaWiki properties. | ||
| Line 53: | Line 54: | ||
"label": "SMILES", | "label": "SMILES", | ||
"type": "string" | "type": "string" | ||
} | |||
}, | }, | ||
"format": "block" | "format": "block" | ||
} | } | ||
</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> | |||
{{#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:{{{class|}}}| | </table></includeonly> | ||
}} | |||
{{#if:{{{prodrug_of|}}}| | |||
}} | |||
{{#if:{{{formula|}}}| | |||
}} | |||
{{#if:{{{molar_mass|}}}| | |||
}} | |||
{{#if:{{{cas|}}}| | |||
}} | |||
{{#if:{{{iupac|}}}| | |||
}} | |||
{{#if:{{{smiles|}}}| | |||
}} | |||
Latest revision as of 18:51, 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 |