<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplate_invocation%2Fdoc</id>
	<title>Module:Template invocation/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplate_invocation%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Template_invocation/doc&amp;action=history"/>
	<updated>2026-04-08T17:35:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Module:Template_invocation/doc&amp;diff=13536&amp;oldid=prev</id>
		<title>Caleb Cooper at 18:29, 21 October 2020</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Template_invocation/doc&amp;diff=13536&amp;oldid=prev"/>
		<updated>2020-10-21T18:29:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:29, 21 October 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;name&#039;&#039;&#039; - the name of the template (string, required). This should be exactly as it will appear in the invocation, e.g. for [[Template:Example]] use &quot;Example&quot;. To generate the template name from a page name you can use the [[#Name|name]] function.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;name&#039;&#039;&#039; - the name of the template (string, required). This should be exactly as it will appear in the invocation, e.g. for [[Template:Example]] use &quot;Example&quot;. To generate the template name from a page name you can use the [[#Name|name]] function.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;args&#039;&#039;&#039; - the arguments to use in the invocation (table, required). Table keys and values must be either strings or numbers.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;args&#039;&#039;&#039; - the arguments to use in the invocation (table, required). Table keys and values must be either strings or numbers.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;format&#039;&#039;&#039; - the format of the invocation (string, optional). The default is a normal invocation with unescaped curly braces, pipes, and equals signs. If this parameter is the string &quot;nowiki&quot;, then the curly braces, pipes and equals signs are replaced with the appropriate [[HTML entities]].&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;format&#039;&#039;&#039; - the format of the invocation (string, optional). The default is a normal invocation with unescaped curly braces, pipes, and equals signs. If this parameter is the string &quot;nowiki&quot;, then the curly braces, pipes and equals signs are replaced with the appropriate [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Wikipedia:&lt;/ins&gt;HTML entities]].&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Module:Template_invocation/doc&amp;diff=13535&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot;This is a meta-module for producing MediaWiki template invocations.  == Usage ==  First load the module:  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; local mTemplateInvocation = require(&#039;Mod...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Template_invocation/doc&amp;diff=13535&amp;oldid=prev"/>
		<updated>2020-10-21T18:28:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This is a meta-module for producing MediaWiki template invocations.  == Usage ==  First load the module:  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; local mTemplateInvocation = require(&amp;#039;Mod...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a meta-module for producing MediaWiki template invocations.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
First load the module:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mTemplateInvocation = require(&amp;#039;Module:Template invocation&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can use the individual functions as documented below.&lt;br /&gt;
&lt;br /&gt;
=== Name ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mTemplateInvocation.name(title)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;:&amp;quot;, and for other pages it returns the full page name. &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; can be a string or a [[mw:Extension:Scribunto/Lua reference manual#Title objects|mw.title object]].&lt;br /&gt;
&lt;br /&gt;
=== Invocation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mTemplateInvocation.invocation(name, args, format)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a MediaWiki [[Help:Template|template]] invocation.&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039; - the name of the template (string, required). This should be exactly as it will appear in the invocation, e.g. for [[Template:Example]] use &amp;quot;Example&amp;quot;. To generate the template name from a page name you can use the [[#Name|name]] function.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;args&amp;#039;&amp;#039;&amp;#039; - the arguments to use in the invocation (table, required). Table keys and values must be either strings or numbers.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;format&amp;#039;&amp;#039;&amp;#039; - the format of the invocation (string, optional). The default is a normal invocation with unescaped curly braces, pipes, and equals signs. If this parameter is the string &amp;quot;nowiki&amp;quot;, then the curly braces, pipes and equals signs are replaced with the appropriate [[HTML entities]].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The code {{code|1=mTemplateInvocation.invocation(&amp;#039;foo&amp;#039;, {&amp;#039;bar&amp;#039;, &amp;#039;baz&amp;#039;, abc = &amp;#039;def&amp;#039;})|2=lua}} would produce &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{foo|bar|baz|abc=def}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>