Jump to content

Template:LabelOrElse: Difference between revisions

From Philosophical Research
m move class onto swatch
m pass class parameter to I template
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<onlyinclude><span class="item-code"><span class="{{{class|}}}">{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q1|}}}}}}}</span>{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{{E|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }} | {{{Q|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{1|(Item name missing)}}}]] }} | #default = {{#if: {{{2|}}} | [[{{{href|}}}|{{{2}}}]] | [[{{{href|}}}|{{{1|(Item name missing)}}}]] }} }}</span></onlyinclude><!--
<onlyinclude><span class="item-code">{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}|{{{E|}}}={{#if:{{{2|}}}|[[Ontology:Q{{{Q|617}}}|{{{2}}}]]|[[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]]}}|{{{Q|}}}={{#if:{{{2|}}}|[[Ontology:{{{E|Q617}}}|{{{2}}}]]|[[Ontology:{{{E|Q617}}}|{{{1|(Item name missing)}}}]]}}|#default={{#if: {{{2|}}}|[[{{{href|}}}|{{{2}}}]]|[[{{{href|}}}|{{{1|(Item name missing)}}}]]}}}}</span></onlyinclude><!--
more readable version:
more readable version:


{{#if: {{{I|}}} | {{Template:I{{{I|}}} |Q={{{Q1|}}}}} }}
<span class="item-code">
{{#if:{{{I|}}} | {{Template:I{{{I|}}} |Q={{{Q|}}} |class={{{class|}}} }} }}
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
| {{{E|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }}
| {{{E|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }}
| {{{Q|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{1|(Item name missing)}}}]] }}
| {{{Q|}}} = {{#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>
-->
-->



Latest revision as of 11:36, 29 December 2025

(Item name missing)

Parameters[edit]

  • 1 - primary label
  • 2 - alternate label
  • E - Item identifier including "Q" etc. If not supplied, Q will be used
  • Q - Item number not including "Q"
  • href - entry title, freeform
  • I - swatch icon (optional)
  • class - swatch color for icon (optional)