Anonymous

Melvor Idle:Contributing: Difference between revisions

From Melvor Idle
m
added template and module description
mNo edit summary
m (added template and module description)
Line 27: Line 27:
== Templates ==
== Templates ==
We use a number of templates on the wiki for various purposes. Such as the <nowiki>{{Menu}}</nowiki> template for the menu at the bottom of the page.
We use a number of templates on the wiki for various purposes. Such as the <nowiki>{{Menu}}</nowiki> template for the menu at the bottom of the page.
To access the source page of a template, as for example the Menu template, simply go to the <code>Template:Menu</code> page. Because these pages are templates, they will automatically be imported when referred to, and therefore do not need the prior colon. Otherwise you'd need to prepend a colon to the page name <code><nowiki>{{:Menu}}</nowiki></code> to include its content.
Templates furthermore support numeric arguments, referenced in the templates by <code><nowiki>{{{1}}}</nowiki></code>, but also named arguments, such as <code><nowiki>{{{text}}}</nowiki></code> for <code><nowiki>{{ItemIcon|Mole|text=A summon}}</nowiki></code>.
Some of the templates are simply wrappers for Lua modules, which will include <code><nowiki>{{#invoke:SomeModule|someFunction}}</nowiki></code>. To access the module source files, simply go to <code><nowiki>Module:SomeModule</nowiki></code>, and look for <code>someFunction</code> in there.
Also note that if an argument is optional, you can simply append a pipe symbol after its name (be it numeric or a named keyword argument) to default to the empty string.


=== Versioning ===
=== Versioning ===
892

edits