Template:NationDataNameRedirect: Difference between revisions

From Terra Invicta Official Wiki
Llamageddon (talk | contribs)
mNo edit summary
Llamageddon (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{subst:#invoke:NationNamer|Redirect|{{{1|}}}}}</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
<includeonly>{{subst:#invoke:NationNamer|Redirect|{{{1}}}}}</includeonly><noinclude>
{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 11:53, 13 December 2025


This is the Template Documentation from Template:NationDataNameRedirect/doc.

This template is intended for use alongside the subst: magic word, to help with quickly generating multiple nation redirect pages.

Parameters

This template expects a single positional parameter (1).

Usage

This template will search the array at Module:NationNamer/dataNames for a nation/union name that matches parameter 1 and return the equivalent three-letter country code and output a #REDIRECT string with that code as the redirect target page.

If no match is found, it will output the string "No such nation name".

Expected redirect page syntax is expected, and the subst: magic word is required to ensure a correct redirect link is generated. Missing/incorrect use of subst: will either simply add text to a page, or create a numbered list from the link.

Examples

To create a redirect based on the current page title:

{{subst:NationDataNameRedirect|{{subst:PAGENAME}}}}


To create a redirect to the nation "Aceh":

{{subst:NationDataNameRedirect|Aceh}}

Unexpected/alternative usage examples

Incorrect redirect page syntax would result in a numbered list:

  1. REDIRECT ACE


Without the subst: magic word, it will simply output the template link as text:

{{NationDataNameRedirect|Aceh}}

{{subst:#invoke:NationNamer|Redirect|Aceh}}


If no nation name matches parameter 1:

No such nation name