Jump to content

Template:LabelOrElse: Difference between revisions

From Philosophical Research
m restore old if statement
m require E
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|}}} = {{#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><!--
<onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|Q={{{Q|}}}|class={{{class|}}}}}}}<data value="{{{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|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Philosophical Research:{{{R}}}|{{{2}}}]] | [[Philosophical Research:{{{R}}}|{{{1|(Item name missing)}}}]] }} | {{{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:
Line 6: Line 6:
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
| {{{E|}}}{{{R|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{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|}}} = {{#if: {{{2|}}} | [[Philosophical Research:{{{R}}}|{{{2}}}]] | [[Philosophical Research:{{{R}}}|{{{1|(Item name missing)}}}]] }}
| {{{E|}}}{{{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)}}}]] }}
| {{{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>
Line 16: Line 16:
* <code>1</code> - primary label
* <code>1</code> - primary label
* <code>2</code> - alternate label
* <code>2</code> - alternate label
* <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.
* <code>Q</code> - Item number not including "Q"
* <code>Q</code> - Item number not including "Q"
* <code>R</code> - Philosophical Research: entry, to be used instead of <code>Q</code> or <code>E</code>
* <code>R</code> - Philosophical Research: entry, to be used instead of <code>E</code>
* <code>href</code> - external link
* <code>href</code> - external link
* <code>I</code> - swatch icon (optional)
* <code>I</code> - swatch icon (optional)

Revision as of 03:45, 28 February 2026

(Item name missing)

Parameters

  • 1 - primary label
  • 2 - alternate label
  • E - Item identifier including "Q" etc.
  • Q - Item number not including "Q"
  • R - Philosophical Research: entry, to be used instead of E
  • href - external link
  • I - swatch icon (optional)
  • class - swatch color for icon (optional)