Template:Modname
Jump to navigation
Jump to search
A template for setting or getting a mod name.
Usage
{{ modname | set/mainpageset/get/strip/extract/getforfile | <supplemental data, depending on $1> }}
- First unnamed parameter
Value | Description | Example code | Example result |
---|---|---|---|
set |
Set a mod name. This is automatically called by {{mod sub-page}} (which should be transcluded on every page) with the correct mod name for the current page.
|
{{modname|set|Forgotten Fables}} |
|
mainpageset |
Automatically set the correct mod name on the main page of a mod. This is because {{mod sub-page}} is not transcluded on the main page of a mod.
|
{{modname|mainpageset}} |
|
get |
Return the previously set mod name. | {{modname|get}} |
Forgotten Fables |
strip |
Remove the mod name from a page name. Defaults to the current page name if the second unnamed parameter is omitted. | {{modname|strip|Forgotten Fables/Alabaster/Unlocks}} |
Alabaster/Unlocks |
extract |
Extract the mod name from a page name. | {{modname|extract|Forgotten Fables/Alabaster/Unlocks}} |
Forgotten Fables |
getforfile |
Return a mod name (the previously set one if none is provided), normalized to fit the file naming guidelines for unreleased mods. Usually only useful in other templates. | {{modname|getforfile}} {{modname|getforfile|User:52.15.129.90/MyMod}} |
Forgotten Fables User-52.15.129.90-MyMod |
See also