Jump to content

Template:A: Difference between revisions

From Philosophical Research
allow linking Ontology page
add fallback when there's no URL
 
Line 1: Line 1:
<includeonly><onlyinclude>{{#if:{{{datetime|}}}|<time datetime="{{{datetime|}}}">}}{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{{1|}}}{{{E|}}} = [{{{href|}}}] | {{{E|}}} = [{{{href|}}} {{{1|}}}] | {{{1|}}} = [[Ontology:{{{E|}}}]] | #default = [[Ontology:{{{E|}}}|{{{1|}}}]] }}{{#if:{{{datetime|}}}|</time>}}</onlyinclude></includeonly><!--
<includeonly><onlyinclude>{{#if:{{{datetime|}}}|<time datetime="{{{datetime|}}}">}}{{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}} | {{{1|}}}{{{E|}}}{{{href|}}} = {{{1|}}} | {{{1|}}}{{{E|}}} = [{{{href|}}}] | {{{E|}}} = [{{{href|}}} {{{1|}}}] | {{{1|}}} = [[Ontology:{{{E|}}}]] | #default = [[Ontology:{{{E|}}}|{{{1|}}}]] }}{{#if:{{{datetime|}}}|</time>}}</onlyinclude></includeonly><!--


more readable version:
more readable version:
Line 5: Line 5:
{{#if:{{{datetime|}}}|<time datetime="{{{datetime|}}}">}}
{{#if:{{{datetime|}}}|<time datetime="{{{datetime|}}}">}}
   {{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
   {{#switch:{{{ParameterThatShouldAlwaysBeEmpty|}}}
    | {{{1|}}}{{{E|}}}{{{href|}}} = {{{1|}}}
     | {{{1|}}}{{{E|}}} = [{{{href|}}}]
     | {{{1|}}}{{{E|}}} = [{{{href|}}}]
     | {{{E|}}} = [{{{href|}}} {{{1|}}}]
     | {{{E|}}} = [{{{href|}}} {{{1|}}}]

Latest revision as of 00:45, 28 February 2026

Demo[edit]

wikidata.org

Description[edit]

This is a template for making external links with the parameters in any order. It does not call Template:TTS, although it can be used to improve accessibility by making a page's source text more readable.

Parameters[edit]

  • 1 - link text (optional)
  • href - link URL