<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://elite.mistflux.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AFor_each_named_parameter%2Fdoc</id>
	<title>Module:For each named parameter/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://elite.mistflux.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AFor_each_named_parameter%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://elite.mistflux.co.uk/w/index.php?title=Module:For_each_named_parameter/doc&amp;action=history"/>
	<updated>2026-11-01T02:51:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://elite.mistflux.co.uk/w/index.php?title=Module:For_each_named_parameter/doc&amp;diff=111484&amp;oldid=prev</id>
		<title>Wikipedia&gt;BrandonXLF: /* See also */ Category:Wikitext processing modules</title>
		<link rel="alternate" type="text/html" href="https://elite.mistflux.co.uk/w/index.php?title=Module:For_each_named_parameter/doc&amp;diff=111484&amp;oldid=prev"/>
		<updated>2026-08-28T22:20:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See also: &lt;/span&gt; &lt;a href=&quot;/w/index.php?title=Category:Wikitext_processing_modules&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Wikitext processing modules (page does not exist)&quot;&gt;Category:Wikitext processing modules&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This module allows templates to take arbitrary named parameters and execute wiki code for each name-value pair.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:&amp;lt;/nowiki&amp;gt;For each named parameter|main|&amp;#039;&amp;#039;separator&amp;#039;&amp;#039;|code=&amp;#039;&amp;#039;code&amp;#039;&amp;#039;}}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;code&amp;#039;&amp;#039; can also be given without a name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:&amp;lt;/nowiki&amp;gt;For each named parameter|main|&amp;#039;&amp;#039;separator&amp;#039;&amp;#039;|&amp;#039;&amp;#039;code&amp;#039;&amp;#039;}}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Runs &amp;#039;&amp;#039;code&amp;#039;&amp;#039; for each named parameter of the parent template, with the name available as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{name}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and the value as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{{value}}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The results are concatenated and separated by &amp;#039;&amp;#039;separator&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The code should be wrapped in &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; tags. Otherwise, it is evaluated before the module is invoked, which may lead to unexpected results.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Simple example ===&lt;br /&gt;
&lt;br /&gt;
[[Module:For each named parameter/example0]] has the wikitext:&lt;br /&gt;
{{#invoke:page|getContent|Module:For each named parameter/example0|as=pre}}&lt;br /&gt;
&lt;br /&gt;
Hence, calling it with some params:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Module:For each named parameter/example0|a=b|c=d|e=f}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
{{Module:For each named parameter/example0|a=b|c=d|e=f}}&lt;br /&gt;
&lt;br /&gt;
=== Example demonstrating why &amp;amp;lt;nowiki&amp;gt; tags are recommended ===&lt;br /&gt;
&lt;br /&gt;
[[Module:For each named parameter/example0]] has the wikitext:&lt;br /&gt;
{{#invoke:page|getContent|Module:For each named parameter/example0|as=pre}}&lt;br /&gt;
Note that the code is not wrapped in &amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot; inline&amp;gt;&amp;lt;nowiki&amp;gt;...&amp;lt;/nowiki&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; tags.&lt;br /&gt;
Hence, calling it with params &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Module:For each named parameter/example0|name=name was replaced|value=value was replaced|a=b|c=d}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
{{Module:For each named parameter/example0|name=name was replaced|value=value was replaced|a=b|c=d}}&lt;br /&gt;
&lt;br /&gt;
=== Example with line breaks ===&lt;br /&gt;
&lt;br /&gt;
[[Module:For each named parameter/example1]] has the wikitext:&lt;br /&gt;
{{#invoke:page|getContent|Module:For each named parameter/example1|as=pre}}&lt;br /&gt;
(Note the line breaks in the separator.)&lt;br /&gt;
&lt;br /&gt;
Hence, calling it with some params:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Module:For each named parameter/example1|a=b|c=d|e=f}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
produces:&lt;br /&gt;
{{Module:For each named parameter/example1|a=b|c=d|e=f}}&lt;br /&gt;
&lt;br /&gt;
=== Example with special handling of a parameter ===&lt;br /&gt;
&lt;br /&gt;
[[Module:For each named parameter/example2]] has the wikitext:&lt;br /&gt;
{{#invoke:page|getContent|Module:For each named parameter/example2|as=pre}}&lt;br /&gt;
It generates a table row for each parameter, but not for the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; parameter (since it should only appear as the table title). Instead, it produces an empty string (note the &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;). Generally, if the code produces an empty string for a parameter, the module omits it and also does not emit a separator.&lt;br /&gt;
&lt;br /&gt;
Hence, calling it with these params:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Module:For each named parameter/example2|title=My Title|a=b|c=d|e=f}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
produces:&lt;br /&gt;
&lt;br /&gt;
{{Module:For each named parameter/example2|title=My Title|a=b|c=d|e=f}}&lt;br /&gt;
&lt;br /&gt;
Note that due to technical limitations (of Lua tables), the order in which the parameters are processed cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Infinite parameters modules}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Template metamodules]]&lt;br /&gt;
[[Category:Wikitext processing modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Module documentation pages]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;BrandonXLF</name></author>
	</entry>
</feed>