Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Is it possible to do basic transformation of text in a MediaWiki template?

$
0
0

I have created a template on my MediaWiki wiki which shortcuts linking to some frequently used book titles. One of the parameters controls whether the shortcut template points at my wiki or another one, via a switch case. I'd like to add another option which points to a non-wiki website, where a page for the book "Book Title" has a URL ending in "/book-title/".

To avoid having to specify alternate text or the full link in every individual case, I'd like to transform the title of the book (which is already passed to the template as a parameter) into lower case and replace spaces in the title with dashes, so it can just be inserted at the end of the URL.

Is this possible? How would you do that? I've tried searching the MediaWiki help pages for templates but haven't found anything that seems to do this.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>