Forum:Template parameters

Is there a method to test for the numbers of parameters used to call a template? --Koppa Dasao ƒłелањі каселањін на 11:53, October 2, 2012 (UTC)


 * There is no good way to do it, no. The best you can do is choose a certain 'maximum' number of parameters you want to support and then copy and paste your logic block that many times. Here's a parameter counting template, but it only goes up to 6, you can modify it to go higher but it won't work on an arbitrary number of parameters.


 * In pointless pie-in-the-sky news, there's mw:Extension:Scribunto which allows you to write templates in Lua instead of MediaWiki's Byzantine syntax. No idea when that's going to ready for public consumption though, or if Wikia will even install it. Lunarity 19:50, October 2, 2012 (UTC)


 * Well, that was certainly not what I was hoping for, however, while waiting for an answer I found a method that works, although it's not what I was interested in. --Koppa Dasao ƒłелањі каселањін на 20:06, October 2, 2012 (UTC)