Difference between revisions of "Template:Toponym link"

From The Coppermind
Jump to navigation Jump to search
m (try that)
(Switch to actually generating links, since link values are already stored in Template:Toponym)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#switch:{{lc:{{{1}}}|}}<!--
+
<includeonly>{{#if:{{toponym|{{{1}}}}}<!--
  +
-->|[[{{toponym|{{{1}}}|link=y}}|{{ucfirst:{{toponym|{{{1}}}}}}}]]<!--
  +
-->|[[{{{1}}}]]
 
}}</includeonly><noinclude>[[category: link macros]]
   
  +
This template generates a link to a location for infoboxes, capitalizing the first letter and handling any cases where the link target is different from the display text (e.g., when the name of the location is [[:category: disambiguation pages|ambiguous]] with another page). If the location is not listed at {{t|toponym}}, it returns a standard link.
-->|elantris|elantrian|elantrians=Elantris (city)<!--
 
 
-->|{{toponym|{{{1}}}|}}<!--
 
 
-->}}<noinclude>
 
 
This template includes all special cases of {{t|toponym}} for pages which need to be made [[:category: disambiguation|unambiguous]].
 
   
 
See also: {{t|toponym}}, {{t|demonym}}, {{t|toponym tag}}
 
See also: {{t|toponym}}, {{t|demonym}}, {{t|toponym tag}}
   
  +
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full list of pages using this template|here}}
[[category: link macros]]
 

Latest revision as of 22:11, 8 March 2024


This template generates a link to a location for infoboxes, capitalizing the first letter and handling any cases where the link target is different from the display text (e.g., when the name of the location is ambiguous with another page). If the location is not listed at {{toponym}}, it returns a standard link.

See also: {{toponym}}, {{demonym}}, {{toponym tag}}