Loop Tag
========
In this article:
- `Introduction`_
- `Use in template`_
Introduction
------------
Probably everyone faced with a situation where same content should displayed several times. Of course this problem can be solve with
well-known standard JSP tag ``forEach``, but it is not enough if count cycle of content changed very often. That is why ImCMS provide own cycle tag that called ``loop``.
``loop`` tag works like the ``forEach`` tag, but the main feature of it is visual editor that provide agile configuration of content`s count, etc.
Use in template
---------------
For configure ``loop`` tag in template just look at the code below.
.. code-block:: jsp
...some content that will be repeated
Available list of tag attributes:
"""""""""""""""""""""""""""""""""
+--------------------+--------------+--------------------------------------------------+
| Attribute | Type | Description |
+====================+==============+==================================================+
| no | Integer | Identifier for current loop |
+--------------------+--------------+--------------------------------------------------+
| pre | String | Text or html tag that would be added before |
| | | loop tag |
+--------------------+--------------+--------------------------------------------------+
| post | String | Text or html tag that would be added after loop |
| | | tag |
+--------------------+--------------+--------------------------------------------------+
| label | String | Label that is used to describe loop tag |
+--------------------+--------------+--------------------------------------------------+
Example:
""""""""
.. code-block:: jsp
<%@taglib prefix="imcms" uri="imcms" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
Template