ItemLink.pm


NAME

Communiware::DE::ItemLink - Dynamic element ItemLink


SYNOPSIS

   <:ItemLink item text [maxlen [template [class [attrs]]]]:>


DESCRIPTION

Creates link to item. First arg is context attribute name, which denotes item to link to (If no such attribute exist, assumes than item_id is given explicitely).

Text is link text. Attriubute substitution is performed on it. If maxlen is not zero, and link text is longer, than maxlen, it is truncated. Use with care, and only if text doesn't contain HTML markup. Default value of maxlen is 2000 If template is specified, link would display item with given template.

class, if not empty, should be list of pairs like attr=value which are used as additional attributes of A HTML tag. If value doesn't contain = sign it would be interpreted as value of class atribute.

attrs is a list of attributes, which should be passed to linked page. It is comma-separated list of attribute names (then values from current context would be passed if and only if these attributes have non-empty values in the current context) or attribute=value pairs. Attributes which have their values specified, would be passed even specified value is empty.

If no attrs is specified, then list of attributes, defined by PassParams dynamic element earlier in the template would be passed.

16 октябрь 2007 13:44