Template:NationDataNameRedirect: Difference between revisions
Llamageddon (talk | contribs) m worked too well, checking if noinclude stops it writing to this page... Tag: Removed redirect |
Llamageddon (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>#REDIRECT [[ | <includeonly>#REDIRECT [[#invoke:NationNamer|Dataname]]</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude> | ||
Revision as of 01:19, 5 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:
- REDIRECT ACE
Without the subst: magic word, it will simply output the template link as text:
{{NationDataNameRedirect|Aceh}}
- REDIRECT Dataname
If no nation name matches parameter 1:
No such nation name


