EE 1
EE 2
Loop Plugin
Developer
3rd Party (Free)
Compatibility
- Multi Site Manager
- Stand Alone Entry Form
- Low Variables
- Better Workflow
- Matrix
Requirements
- jQuery for the Control Panel
Categories
Plugin
Tags
The only way of putting repetitive numerical values into your templates is either by hard-coding them in or by enabling and using php to do it. I always try to avoid enabling php in templates for security purposes, and hard-coding in for example a drop-down select box with 100 values is never fun. This plugin solves the problem by allowing you to perform loops in your templates.
The loop plugin works just like a simplified for loop does. It takes as parameters an initial value, an increment value, and a limit.
Here is an example of using the loop plugin to create a drop-down select box that allows the user to select the year in which they were born:
<select name="year">
<option value="">Select year</option>
{exp:for_loop start="1980" end="2011" increment="1"}
<option value="{index}">{index}</option>
{/exp:for_loop}
</select>
Loop Plugin Links
This entry was created October 3, 2008, 2:41 pm.
This entry was last updated January 8, 2012, 12:55 am.
Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!
1 Review:
a&m impact 05.14.13
Works as expected, very easy in use.