Template:LabelOrElse: Difference between revisions
Appearance
m debug |
m restore old if statement |
||
| Line 1: | Line 1: | ||
<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)}}}}} | <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|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }} | {{{E|}}}{{{Q|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Philosophical Research:{{{R}}}|{{{2}}}]] | [[Philosophical Research:{{{R}}}|{{{1|(Item name missing)}}}]] }} | {{{Q|}}}{{{R|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{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"> | <data class="item-name"> | ||
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | ||
| {{{E|}}}{{{R|}}}{{{href|}}} = [[Ontology:Q{{{Q|617}}}|{{{2|{{{1|(Item name missing)}}}}} | | {{{E|}}}{{{R|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }} | ||
| {{{E|}}}{{{Q|}}}{{{href|}}} = [[Philosophical Research:{{{R}}}|{{{2|{{{1|(Item name missing)}}}}} | | {{{E|}}}{{{Q|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Philosophical Research:{{{R}}}|{{{2}}}]] | [[Philosophical Research:{{{R}}}|{{{1|(Item name missing)}}}]] }} | ||
| {{{Q|}}}{{{R|}}}{{{href|}}} = [[Ontology:{{{E|Q617}}}|{{{2|{{{1|(Item name missing)}}}}} | | {{{Q|}}}{{{R|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{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:31, 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)