Semantic MediaWiki template variables[edit source]
If you do not pass in the franchise, it will look it up for you (as seen in the docs page). But, when you use the template in an
#ask lookup, it does not pass the franchise of the Hero down to the template. They all have a blank value.
- I had the same problem when I was working on Template:Custom hero tile list, and after some trial and error and some perusing of the Semantic MediaWiki website, I was able to figure it out. The solution is that when working on passing an
#askinto a template, you have to add in
link = none. The reason for that is basically, after performing a search, the
#askfunction doesn't just return the name of the pages that fit the query, it returns a link to the page by default. This is normally good when you aren't using a template, but when you are, the
#askfunction will pass on a link (for example
[[Abathur]]) to the template instead of just the name (
Abathur). Since templates aren't coded to receive the square brackets as an input, it will cause them to behave strangely. Adding
link = noneremoves the square brackets and causes the receiving template to behave as expected.
- — MetricTrout (talk) 22:53, 6 September 2017 (UTC)
We can no longer support Semantic MediaWiki in our environment and will be removing it as soon as possible. How heavily invested are you in it on this particular wiki? We will provide as much help as we can to convert any templates or pages you have that use it — Game widow (talk) 14:21, 17 January 2018 (UTC)