Thread:Andrey Andrey/@comment-23880286-20150701101945/@comment-23880286-20150709155605

Andrey Andrey wrote: http://steven-universe.wikia.com/wiki/Template:EpisodeLinks How this works? What the invoke function does? Why there are commas? Doesn't #invoke work with Lua coding language only? (it's not enabled here, i guess. Didn't check.)?
 * 1) invoke calls methods in Module:EpisodeLinks . The first one calls episode( frame ), the second one calls prevLink( frame ) and the third one calls nextLink( frame ). The template itself does hardly anything. It just steals all information from the module.

There are commas to make it easy to make an array out of them, because commas are what is usually used to separate the elements of an array. Now you can just catch those values by simply putting and then call them by using #arrayindex. This keeps the three different values separated. Index 0 holds the current episode name, index 1 holds a link to the previous episode/transcript/gallery page, index 2 holds a link to the next episode/transcript/gallery page.


 * 1) invoke works in the template language, and calls something in the Lua language. It is the connection between templates and Lua (modules). Module:EpisodeLinks is written in Lua (like all modules, we only have EpisodeLinks though).

And I don't know since when (I could look it up, but I don't think it's really necessary to know), but Scribunto is now automatically enabled on all wikis.