Jump to content

Template:LabelOrElse: Difference between revisions

From Philosophical Research
m check for href
m pass tradTTS
 
(16 intermediate revisions by the same user not shown)
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|}}}{{{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><!--
<onlyinclude>{{#if:{{{I|}}}|{{Template:I{{{I|}}}|lang={{{lang|}}}|Q={{{Q|}}}|QTTS={{{QTTS|}}}|sense={{{sense|}}}|trad={{{trad|}}}|tradTTS={{{tradTTS|}}}|class={{{class|}}}}}}}<span class="search-hint" aria-hidden="true" style="height: 0px; width: 0px; display: inline-block; overflow: hidden;"> ({{#if:{{{Q2|}}}|{{{Q2|}}}|{{{Q|}}}}})</span><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:
 
{{#if:{{{I|}}} | {{Template:I{{{I|}}}|lang={{{lang|}}} |Q={{{Q|}}}|QTTS={{{QTTS|}}}|sense={{{sense|}} |class={{{class|}}} }}  }}
{{#if:{{{I|}}} | {{Template:I{{{I|}}} |Q={{{Q|}}} |class={{{class|}}} }}  }}
<span class="search-hint" aria-hidden="true" style="height: 0px; width: 0px; display: inline-block; overflow: hidden;"> ({{#if:{{{Q2|}}}|{{{Q2|}}}|{{{Q|}}}}})</span>
<span class="item-name">{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
<data class="item-name">
| {{{E|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:Q{{{Q|617}}}|{{{2}}}]] | [[Ontology:Q{{{Q|617}}}|{{{1|(Item name missing)}}}]] }}
{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
| {{{Q|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{1|(Item name missing)}}}]] }}
| {{{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)}}}] }}
| #default = {{#if: {{{2|}}} | [{{{href|}}} {{{2}}}] | [{{{href|}}} {{{1|(Item name missing)}}}] }}
}}</span>
}}</data>
-->
-->


Line 13: Line 16:


* <code>1</code> - primary label
* <code>1</code> - primary label
* <code>2</code> - alternate label
* <code>2</code> - alternate label to be used if specified, "or else" primary label will be used
* <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>Q2</code> - Item number without commas, to be used for <kbd>Ctrl</kbd> + <kbd>F</kbd> search
* <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)

Latest revision as of 06:02, 14 March 2026

(Item name missing)

Parameters[edit]

  • 1 - primary label
  • 2 - alternate label to be used if specified, "or else" primary label will be used
  • E - Item identifier including "Q" etc.
  • Q - Item number not including "Q"
  • Q2 - Item number without commas, to be used for Ctrl + F search
  • R - Philosophical Research: entry, to be used instead of E
  • href - external link
  • I - swatch icon (optional)
  • class - swatch color for icon (optional)