<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3AFor_nowiki%2Fdoc</id>
	<title>Template:For nowiki/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3AFor_nowiki%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Template:For_nowiki/doc&amp;action=history"/>
	<updated>2026-04-07T08:35:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Template:For_nowiki/doc&amp;diff=16964&amp;oldid=prev</id>
		<title>Wikipedia&gt;GKFX: Move warning to own template</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Template:For_nowiki/doc&amp;diff=16964&amp;oldid=prev"/>
		<updated>2021-06-29T23:13:57Z</updated>

		<summary type="html">&lt;p&gt;Move warning to own template&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{warning nowiki broken}}&lt;br /&gt;
{{lua|Module:For nowiki}}&lt;br /&gt;
&lt;br /&gt;
This template implements a [[foreach loop]]. It interprets a given wikitext (unlike {{tl|For loop}}, which calls a specified template) once for each item in the list.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
 {{tlp|For nowiki|&amp;#039;&amp;#039;separator&amp;#039;&amp;#039;|{{tag|nowiki|content=&amp;#039;&amp;#039;wikitext&amp;#039;&amp;#039;}}|item1|item2|...}}&lt;br /&gt;
 {{tlp|For nowiki|&amp;#039;&amp;#039;separator&amp;#039;&amp;#039;|{{tag|nowiki|content=&amp;#039;&amp;#039;wikitext&amp;#039;&amp;#039;}}|count{{=}}&amp;#039;&amp;#039;count&amp;#039;&amp;#039;}}&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;#039;&amp;#039;separator&amp;#039;&amp;#039;&amp;lt;/code&amp;gt; is inserted &amp;#039;&amp;#039;between&amp;#039;&amp;#039; the results of &amp;lt;code&amp;gt;&amp;#039;&amp;#039;wikitext&amp;#039;&amp;#039;&amp;lt;/code&amp;gt; interpretation. Whitespace is preserved.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;#039;&amp;#039;wikitext&amp;#039;&amp;#039;&amp;lt;/code&amp;gt; is interpreted once for each item in the list. It then may use {{code|&amp;lt;nowiki&amp;gt;{{{1}}}&amp;lt;/nowiki&amp;gt;}} to get the item value, and {{code|&amp;lt;nowiki&amp;gt;{{{i}}}&amp;lt;/nowiki&amp;gt;}} to get its position in the list (starting from 1), as well as any parameters that were passed to {{tl|for nowiki}}. It may also contain template calls. To use a parameter passed to the calling template, surround it with {{nowrap|&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;...&amp;lt;no&amp;lt;!----&amp;gt;wiki&amp;gt;&amp;lt;/code&amp;gt;}} (the opening and closing tags are swapped) or pass the parameter directly to {{tl|for nowiki}} if its name doesn&amp;#039;t conflict with any reserved parameters.&lt;br /&gt;
&lt;br /&gt;
=== Count form ===&lt;br /&gt;
The second form of this template using a {{para|count}} parameter interprets the given wikitext &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; times, passing each integer between 1 and that &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; as both {{para|1}} and {{para|i}} each time. By default, iteration starts from 1. Use parameter {{para|start|&amp;lt;var&amp;gt;number&amp;lt;/var&amp;gt;}} to start from a different number. Then the iteration will go from &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;start+count-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
{{Markup&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;{{For nowiki|&lt;br /&gt;
|&amp;lt;/nowiki&amp;gt;&amp;amp;lt;&amp;lt;nowiki&amp;gt;nowiki&amp;gt;* Item {{{i}}}: {{3x|{{{1}}} }}&amp;lt;/nowiki&amp;gt;&amp;amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;|dog|cat|bird}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|{{For nowiki|&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;* Item {{{i}}}: {{3x|{{{1}}} }}&amp;lt;/nowiki&amp;gt;|dog|cat|bird}}&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;{{For nowiki|&lt;br /&gt;
|&amp;lt;/nowiki&amp;gt;&amp;amp;lt;&amp;lt;nowiki&amp;gt;nowiki&amp;gt;# [[:Category:{{{1}}} in spaceflight]]&amp;lt;/nowiki&amp;gt;&amp;amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;|count=9|start=1961}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|{{For nowiki|&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;# [[:Category:{{{1}}} in spaceflight]]&amp;lt;/nowiki&amp;gt;|count=9|start=1961}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tl|For loop}}&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
[[Category:Wikitext processing templates]]&lt;br /&gt;
[[Category:Wikipedia formatting and function templates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;GKFX</name></author>
	</entry>
</feed>