Skip to content

Commit

Permalink
add text tag docs
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegDokuka committed Jul 22, 2015
1 parent 29b8252 commit 4fc4e5d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/tag-engine/loop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ In this article:
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.
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.
For configure ``loop`` tag in template just look at the code below.

.. code-block:: jsp
Expand Down
66 changes: 65 additions & 1 deletion docs/tag-engine/text.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,66 @@
Text Tag
========
========

In this article:
- `Introduction`_
- `Use in template`_


Introduction
------------
Each web-page contains piece of text. It can be description of image of information about page. Usually it can be altered, edited and even deleted.
Since text can be stored in database ImCMS provide easy access to it via ``text`` tag.


Use in template
---------------

For configure ``text`` tag in template just look at the code below.


.. code-block:: jsp
<imcms:text no="1" pre="<div>" post="</div>"/>
Available list of tag attributes:
"""""""""""""""""""""""""""""""""

+--------------------+--------------+--------------------------------------------------+
| Attribute | Type | Description |
+====================+==============+==================================================+
| no | Integer | Identifier for current text |
+--------------------+--------------+--------------------------------------------------+
| document | Integer | Identify the linked document (default |
| | | - current document) |
+--------------------+--------------+--------------------------------------------------+
| version | Integer | Identify version of text |
+--------------------+--------------+--------------------------------------------------+
| placeholder | String | The text that was showed if native content are |
| | | empty |
+--------------------+--------------+--------------------------------------------------+
| pre | String | Text or html tag that would be added before |
| | | text tag |
+--------------------+--------------+--------------------------------------------------+
| post | String | Text or html tag that would be added after text |
| | | 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:text no="1" document="1001" pre="<div>" post="</div>" placeholder="<i>this text is empty</i>"/>
</body>
</html>

0 comments on commit 4fc4e5d

Please sign in to comment.