Lua templating/InfoboxBuilder

What's new?
We are happy to introduce a completely new Infobox Builder! It makes creating templates for Infoboxes much easier and faster. You will also benefit from faster rendering of pages.

Step 1 - Lua Modules
Copy these modules: Simply create pages with matching names on your wikia and copy the content.
 * Module:InfoboxBuilder
 * Module:InfoboxBuilderView
 * Module:HF

Step 2 - Infobox Template
You are ready to go! Create a template which will model your infobox. Put in a Template namespace or any other that you use to store templates.

We will get to actual building in a second. Let's just put a necessary structure there:

The new thing here is the "#invoke" command which is used to call Lua modules in wikitext templates.

Let's build a simple infobox model using the new syntax that InfoboxBuilder uses:

Layer 3 - Article
And here... nothing changes. Users use the same templates they have always used. This provides compatibility with the older versions of Infoboxes.

Template
Look at the Template code below: It isn't very complicated and helps you visualise your infobox's structure. At first it invokes the InfoboxBuilder module and its builder function: {{ #invoke:Infobox Builder | builder Then you can change a few variables using this syntax: [index] : [label] = [value] So in this case the code: 0:Theme            = character | 0:Thumbnail caption = On sets character prefix for the infobox's CSS classes and enables displaying of a caption under the main image.

And here comes the fun part! Using the same syntax you build your infobox from our blocks. Using numeric indexes you can decide on the rows' order. So the first row is going to be an image with a caption and filename provided by a user in an article.

| 1:Label = {{{ThumbnailLabel|}}} | 1:Value = {{{Image}}} The Kind parameter is optional and defines what type of data this row contains.
 * 1:Type  = Image

User input
Now the code you need to use this template in an article is for instance:

You can see that this is no different from what users have to do now.