Text.pm
NAME
Communiware::DE::Text - Dynamic element Text. Shows text of item
SYNOPSIS
<:Text parameter=value ... :>
ALLOWED PARAMETERS:
- default_lines
- Number of first lines to display, if text is cut.
- max_lines
- Maximal number of lines to show. If text is longer, it is cut. If it is shorter, all text is shown.
-
If default_lines is specified, and max_lines omitted, it is considered equal to default_lines.
- format
-
format of simplifying text to display.
-
Default value is empty (which means that nothing is omitted)
-
Allowed parameters:
-
a - remove all tags i - replace image tags with alt tags p - remove paragraphs l - remove hyperlinks replacing with description t - "plainest" text useful for using in mail headers - with entities unescaping
- link_text
- What to show as link when text is cut and hyperlink to full text is generated. Default is >>. If text is equal to ``nolink'', link is supressed.
-
If has syntax
link_text=include(templ_name)
, link (not a link text!) is formed using template templ_name. Attributes link_template and link_style are ignored - do_link
- One of ``always'' ``ifcut'' ``never''. Default - ``always'' If ``always'', link to full text is palaced. If ``ifcut'', link to full text is placed when text is cut If ``never'', link to full text is never placed.
-
When
do_link
is specified, iflink_text
is equal to nolink, link text containing word ``nolink'' will be placed - link_template
- Template to show full text. If omitted, link without template name (to items default template) is generated.
- link_style
- Additional attributes for A tag.
- cut_mark
-
Specifies set of chars to be shown when text is cut
default value is ``...''
If has syntax
cut_mark=include(templ_name)
, text is formed using templatetempl_name
- glue_link
- One of ``yes'' or ``no'' Specifies whether link should be at the same line or next one. Default value is ``yes''
DESCRIPTION
Displays text of item. If no arguments given, shows full text, regardless of its length. If parameter default_lines is provided and is not empty string, shows default_lines of text for lengthy items (ones which are longer than max_lines). If max_lines is zero or empty, it equials to default_lines.
If text is cut (or might be cut), link to the page of current item is shown at the end of text. It reads ...>> if text is actually cut, or just >>, if full text is shown (i.e. its length is less than max_lines).
If parameter link_text is provided, it is displayed instead of >>, unless it textually equials to ``nolink'', in which case entire link is suppressed.
BUGS
Due to nature of HTML formatting, exact count of lines cannot be determined. So, line is assumed to be 60 bytes of HTML.
FUTURE
We are going to provide other units of measurement such as words and, possibly, paragraphs