-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bugs, add documentation for loop tag
- Loading branch information
1 parent
bd5e0a8
commit 7014e7d
Showing
107 changed files
with
6,765 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,59 @@ | ||
Loop Tag | ||
======== | ||
|
||
In this article: | ||
- `Introduction`_ | ||
- `Use in template`_ | ||
|
||
Introduction | ||
------------ | ||
Probably everyone faced with a situation where same content should displayed several time. Of course this problem can 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 above. | ||
.. code-block:: jsp | ||
<imcms:loop no="1" pre="<div>" post="</div>"> | ||
...HTML or JPS tags here... | ||
</imcms:loop> | ||
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 | | ||
+--------------------+--------------+--------------------------------------------------+ | ||
Example: | ||
"""""""" | ||
.. code-block:: jsp | ||
<%@taglib prefix="imcms" uri="imcms" %> | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<title>Template</title> | ||
<meta charset="utf-8"/> | ||
</head> | ||
<body> | ||
<imcms:loop no="1" pre="<div>" post="</div>"> | ||
Hello world with loop content | ||
</imcms:loop> | ||
</body> | ||
</html> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.