Jump to content

Template:LabelOrElse: Difference between revisions

From Philosophical Research
m move .item-code
change href to external link
Line 1: Line 1:
<onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}<data value="{{{E|}}}{{{Q|}}}" class="item-name">{{#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|}}}={{#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><!--
more readable version:
more readable version:


Line 6: Line 6:
| {{{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>
}}</span>
-->
-->
Line 16: Line 16:
* <code>E</code> - Item identifier including "Q" etc. If not supplied, <code>Q</code> will be used
* <code>E</code> - Item identifier including "Q" etc. If not supplied, <code>Q</code> will be used
* <code>Q</code> - Item number not including "Q"
* <code>Q</code> - Item number not including "Q"
* <code>href</code> - entry title, freeform
* <code>href</code> - external link
* <code>I</code> - swatch icon (optional)
* <code>I</code> - swatch icon (optional)
* <code>class</code> - swatch color for icon (optional)
* <code>class</code> - swatch color for icon (optional)

Revision as of 03:47, 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)