Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Substance: Difference between revisions

Template page
No edit summary
Automated sync
 
(2 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"
         },
         }
        "legal_de": { "label": "Legal status — Germany", "type": "string" },
        "legal_at": { "label": "Legal status — Austria", "type": "string" },
        "legal_ch": { "label": "Legal status — Switzerland", "type": "string" },
        "legal_us": { "label": "Legal status — United States", "type": "string" },
        "legal_uk": { "label": "Legal status — United Kingdom", "type": "string" },
        "legal_nl": { "label": "Legal status — Netherlands", "type": "string" },
        "legal_ru": { "label": "Legal status — Russia", "type": "string" },
        "legal_by": { "label": "Legal status — Belarus", "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|}}}}}}}{{#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="infobox-substance" style="float:right; clear:right; margin:0 0 1em 1.5em; width:280px; font-size:0.9em">
</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 69:
{{#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>}}
{{#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:{{{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:{{{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>
</table></includeonly>

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.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

Display name. Defaults to page name.

Stringsuggested
Imageimage

Filename without the File: prefix.

Filesuggested
Image captionimage_caption

no description

Stringoptional
Substance classclass

Pharmacological class, e.g. Benzodiazepine, Opioid, Stimulant.

Stringsuggested
Prodrug ofprodrug_of

Active substance this is a prodrug of (bare name, no namespace).

Stringoptional
Molecular formulaformula

Use <sub> tags for subscripts.

Stringoptional
Molar mass (g/mol)molar_mass

no description

Numberoptional
CAS numbercas

no description

Stringoptional
IUPAC nameiupac

no description

Stringoptional
SMILESsmiles

no description

Stringoptional