Content deleted Content added
remove expensive function warning - this no longer applies |
m change source to syntaxhighlight |
||
Line 5:
First load the module:
<
local mTemplateInvocation = require('Module:Template invocation')
</syntaxhighlight>
Then you can use the individual functions as documented below.
Line 13:
=== Name ===
<
mTemplateInvocation.name(title)
</syntaxhighlight>
This function produces the name to be used in a template invocation. For pages in the template namespace it returns the page name with no namespace prefix, for pages in the main namespace it returns the full page name prefixed with ":", and for other pages it returns the full page name. <var>title</var> can be a string or a [[mw:Extension:Scribunto/Lua reference manual#Title objects|mw.title object]].
Line 21:
=== Invocation ===
<
mTemplateInvocation.invocation(name, args, format)
</syntaxhighlight>
This function creates a MediaWiki [[Help:Template|template]] invocation.
|