This is a documentation subpage for Template:For loop. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 798,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. Preview message: Transclusion count updated automatically (see documentation). |
This template uses Lua: |
This template implements a for loop or a foreach loop.
This template calls a user-specified template (the "called template") multiple times: once for each value in either 1) an iterated sequence or 2) an explicit list. Each value in the sequence or list is passed to the same specified parameter of the called template (the "variable parameter"). Optionally, pre- and postfixes can be attached to the passed values.
In addition to the specified variable parameter, other parameters of the called template ("static parameters") can be given a value which is the same in each iteration.