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
Created page with "<noinclude> Infobox for substance articles. Automatically annotates the page with Semantic MediaWiki properties. <templatedata> { "description": "Infobox for psychoactive substance articles.", "params": { "name": { "label": "Name", "description": "Display name. Defaults to page name.", "type": "string", "suggested": true }, "image": { "label": "Image", "description":..."
 
Automated sync
 
(6 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>{{#set:
</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">
  Substance class  = {{{class|}}}
<tr><th colspan="2" class="infobox-substance__title">{{{name|{{PAGENAME}}}}}</th></tr>
| Prodrug of      = {{{prodrug_of|}}}
{{#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>}}}}
| Molar mass      = {{{molar_mass|}}}
{{#if:{{{class|}}}|<tr><th>Class</th><td>[[{{{class}}}]]</td></tr>}}
| SMILES          = {{{smiles|}}}
{{#if:{{{prodrug_of|}}}|<tr><th>Prodrug of</th><td>[[Substance:{{{prodrug_of}}}|{{{prodrug_of}}}]]</td></tr>}}
| IUPAC name      = {{{iupac|}}}
{{#if:{{{formula|}}}|<tr><th>Formula</th><td>{{{formula}}}</td></tr>}}
| Legal status DE  = {{{legal_de|}}}
{{#if:{{{molar_mass|}}}|<tr><th>Molar mass</th><td>{{{molar_mass}}} g/mol</td></tr>}}
| Legal status AT  = {{{legal_at|}}}
{{#if:{{{cas|}}}|<tr><th>CAS number</th><td>{{{cas}}}</td></tr>}}
| Legal status CH  = {{{legal_ch|}}}
{{#if:{{{iupac|}}}|<tr><th>IUPAC name</th><td><small>{{{iupac}}}</small></td></tr>}}
| Legal status US  = {{{legal_us|}}}
{{#if:{{{smiles|}}}|<tr><th>SMILES</th><td><small style="word-break:break-all">{{{smiles}}}</small></td></tr>}}
| Legal status UK  = {{{legal_uk|}}}
 
| Legal status NL  = {{{legal_nl|}}}
</table></includeonly>
| Legal status RU  = {{{legal_ru|}}}
| Legal status BY  = {{{legal_by|}}}
}}{| class="wikitable infobox-substance"
! colspan="2" class="infobox-substance__title" | {{{name|{{PAGENAME}}}}}
{{#if:{{{image|}}}|
|-
| colspan="2" class="infobox-substance__image" | [[File:{{{image}}}|250px|class=skin-invert-image|{{{image_caption|}}}]]
{{#if:{{{image_caption|}}}|
|-
| colspan="2" class="infobox-substance__caption" | {{{image_caption|}}}
}}
}}
{{#if:{{{class|}}}|
|-
! | Class
| [[{{{class}}}]]
}}
{{#if:{{{prodrug_of|}}}|
|-
! | Prodrug of
| [[Substance:{{{prodrug_of}}}|{{{prodrug_of}}}]]
}}
{{#if:{{{formula|}}}|
|-
! | Formula
| {{{formula}}}
}}
{{#if:{{{molar_mass|}}}|
|-
! | Molar mass
| {{{molar_mass}}} g/mol
}}
{{#if:{{{cas|}}}|
|-
! | CAS number
| {{{cas}}}
}}
{{#if:{{{iupac|}}}|
|-
! | IUPAC name
| <small>{{{iupac}}}</small>
}}
{{#if:{{{smiles|}}}|
|-
! | SMILES
| <small style="word-break:break-all">{{{smiles}}}</small>
}}
{{#if:{{{legal_de|}}}{{{legal_at|}}}{{{legal_ch|}}}{{{legal_us|}}}{{{legal_uk|}}}{{{legal_nl|}}}{{{legal_ru|}}}{{{legal_by|}}}|
|-
! colspan="2" class="infobox-substance__section" | Legal status
}}
{{#if:{{{legal_de|}}}|
|-
! | Germany
| {{{legal_de}}}
}}
{{#if:{{{legal_at|}}}|
|-
! | Austria
| {{{legal_at}}}
}}
{{#if:{{{legal_ch|}}}|
|-
! | Switzerland
| {{{legal_ch}}}
}}
{{#if:{{{legal_us|}}}|
|-
! | United States
| {{{legal_us}}}
}}
{{#if:{{{legal_uk|}}}|
|-
! | United Kingdom
| {{{legal_uk}}}
}}
{{#if:{{{legal_nl|}}}|
|-
! | Netherlands
| {{{legal_nl}}}
}}
{{#if:{{{legal_ru|}}}|
|-
! | Russia
| {{{legal_ru}}}
}}
{{#if:{{{legal_by|}}}|
|-
! | Belarus
| {{{legal_by}}}
}}
|}</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