Board Thread:Lua Help/@comment-26942307-20151128194431/@comment-26912683-20151129184340

Short answer is 'yes you can do it'.

The slightly longer answer is that you need to invoke the module with a function name followed by parameters &emdash; the function name cannot take a value.

Taking your examples, you would use: for layout 1; and for layout 2.

These would invoke a function named main module named Module:Lua_Infobox.

Within the function main you would examine the arguments passed to select the appropriate layout.

You will still want to have individual templates associated with the different infoboxes though; as it's much simpler, and less error prone, to do or than the above invoke statements. I hope that helps. Geoff Riley (talk) 18:43, November 29, 2015 (UTC)