Template:LabelOrElse: Difference between revisions
Appearance
m check for href |
allow Research: links |
||
| 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|}}}|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)}}}]]}} | {{{Q|}}}{{{E|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Philosophical Research:{{{R}}}|{{{2}}}]] | [[Philosophical Research:{{{R}}}|{{{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|}}}{{{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)}}}]] }} | ||
| {{{Q|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{1|(Item name missing)}}}]] }} | | {{{Q|}}}{{{R|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Ontology:{{{E|Q617}}}|{{{2}}}]] | [[Ontology:{{{E|Q617}}}|{{{1|(Item name missing)}}}]] }} | ||
| {{{Q|}}}{{{E|}}}{{{href|}}} = {{#if: {{{2|}}} | [[Philosophical Research:{{{R}}}|{{{2}}}]] | [[Philosophical Research:{{{R}}}|{{{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 17: | ||
* <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>R</code> - Philosophical Research: entry, to be used instead of <code>Q</code> or <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 00:56, 28 February 2026
Parameters
1- primary label2- alternate labelE- Item identifier including "Q" etc. If not supplied,Qwill be usedQ- Item number not including "Q"R- Philosophical Research: entry, to be used instead ofQorEhref- external linkI- swatch icon (optional)class- swatch color for icon (optional)