hello, is there any way to call {{PAGENAME}} but have it replace certain characters with other characters if they're present?
i'm using {{PAGENAME}} in a template to automate the insertion of images to a type of page so i only need to upload an image instead of both uploading and typing the name into the page.
example - instead of needing to type in [CHARACTER NAME].png on every character page it'll automatically include it by using {{PAGENAME}}.png.
however, sometimes the name of the page has a colon (:) in it, and thus the image uploaded must replace that colon with a dash (-) due to colon being an invalid file name character. {{PAGENAME}}.png, of course, still calls for the coloned version. any way to keep the convenient aspect of {{PAGENAME}} while being able to change the colon characters to dashes?
ideal solution: if it was a Pokémon wiki and the page was Type: Null, the image would have to be called Type- Null.png instead of Type: Null.png, but would still be automatically included into the Species page without having to enter the file name (Type- Null.png) into the page.
tried to google, found Help:Manipulating strings on wikipedia but i don't understand lol 😭 {{#invoke:String}} doesn't seem like it'll work because the colon can be in any point of the page name wait actually i'm onto something here