Template:LabelOrElse: Difference between revisions
Appearance
allow Research: links |
m clean up switch statement |
||
| Line 1: | Line 1: | ||
<onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}<data value="{{{ | <onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}<data value="{{#if:{{{Q|}}}|Q{{{Q|}}}|{{{E|}}}}}" class="item-name plainlinks">{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{{E|}}}{{{R|}}}{{{href|}}} = [[Ontology:Q{{{Q|617}}}|{{{2|{{{1|(Item name missing)}}}}}}]] | {{{E|}}}{{{Q|}}}{{{href|}}} = [[Philosophical Research:{{{R}}}|{{{2|{{{1|(Item name missing)}}}}}}]] | {{{Q|}}}{{{R|}}}{{{href|}}} = [[Ontology:{{{E|Q617}}}|{{{2|{{{1|(Item name missing)}}}}}}]] | #default = {{#if: {{{2|}}} | [{{{href|}}} {{{2}}}] | [{{{href|}}} {{{1|(Item name missing)}}}] }} }}</data></onlyinclude><!-- | ||
more readable version: | more readable version: | ||
{{#if:{{{I|}}} | {{Template:I{{{I|}}} |Q={{{Q|}}} |class={{{class|}}} }} }} | {{#if:{{{I|}}} | {{Template:I{{{I|}}} |Q={{{Q|}}} |class={{{class|}}} }} }} | ||
< | <data class="item-name"> | ||
| {{{E|}}}{{{R|}}}{{{href|}}} = | {{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | ||
| {{{ | | {{{E|}}}{{{R|}}}{{{href|}}} = [[Ontology:Q{{{Q|617}}}|{{{2|{{{1|(Item name missing)}}}}}}]] | ||
| {{{Q|}}}{{{ | | {{{E|}}}{{{Q|}}}{{{href|}}} = [[Philosophical Research:{{{R}}}|{{{2|{{{1|(Item name missing)}}}}}}]] | ||
| {{{Q|}}}{{{R|}}}{{{href|}}} = [[Ontology:{{{E|Q617}}}|{{{2|{{{1|(Item name missing)}}}}}}]] | |||
| #default = {{#if: {{{2|}}} | [{{{href|}}} {{{2}}}] | [{{{href|}}} {{{1|(Item name missing)}}}] }} | | #default = {{#if: {{{2|}}} | [{{{href|}}} {{{2}}}] | [{{{href|}}} {{{1|(Item name missing)}}}] }} | ||
}}</span> | }}</span> | ||
Revision as of 03:23, 28 February 2026
Parameters
1- primary label2- alternate labelE- Item identifier including "Q" etc. If not supplied,Qwill be usedQ- Item number not including "Q"R- Philosophical Research: entry, to be used instead ofQorEhref- external linkI- swatch icon (optional)class- swatch color for icon (optional)