Attr.pm
NAME
Communiware::DE::Attr - Dynamic element Attr.
SYNOPSIS
<:Attr attribute [format]:>
DESCRIPTION
Displays given attribute using given format.
For attribute of type NUMBER and STRING any format, which is acceptable to printf is acceptable. For attribute of type DATE any format, acceptable for strftime can be used. For RICHTEXT attributes format can be any of values, acceptable by Communiware::Format::untag_html. See Communiware::Format documentation.
Note, that if attribute of type STRING would be shown in user browser exactly as it appear in the context. I.e. any HTML markup would be escaped so user would see it.
Default formats are respectively:
- DATE
-
"%e %B %Y %H:%M"
- NUMBER
-
"%g"
- STRING
-
"%s"
- RICHTEXT
-
"p"
-
If you want full HTML formatting, including paragraphs, use empty format string. This is one of few places in Communiware where missing argument is not equal to empty string.
If attribute have type date and there exist attribute with name ${ATTRIBUTE}_ACCURACY, specificators of time valuse less then given accuracy are removed from format string.
Attribute name can have prefix _ or ^ which means ``lowercase value of attribute'' or ``uppercase it and suffix #n which means ''look into parent context n, instead of current context``.