Jump to content

Template:LabelOrElse: Difference between revisions

From Philosophical Research
change href to external link
m check for href
Line 1: Line 1:
<onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}<data value="{{{E|}}}{{{Q|}}}" class="item-name plainlinks">{{#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)}}}]}}}}</data></onlyinclude><!--
<onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}<data value="{{{E|}}}{{{Q|}}}" class="item-name plainlinks">{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}|{{{E|}}}{{{href|}}}={{#if:{{{2|}}}|[[Ontology:Q{{{Q|617}}}|{{{2}}}]]|[[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]]}}|{{{Q|}}}{{{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|}}} }}  }}
<span class="item-name">{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
<span class="item-name">{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
| {{{E|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }}
| {{{E|}}}{{{href|}}} = {{#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|}}}{{{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 04:09, 27 February 2026

(Item name missing)

Parameters

  • 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 - external link
  • I - swatch icon (optional)
  • class - swatch color for icon (optional)