Zcms:attribute

From GruppoZenit
Jump to: navigation, search

zcms:attribute outputs the value of the content attribute named with "name" attribute to the webpage. This tag contains the attributes which controls the output formats which are listed below.

Attribute Definition
name Required.

Name of the content-attribute.

For the image type attribute two other field are created automatically [attributename]_alt and [attributename]_thumb. The [attributename]_alt has the alternative text and [attributename]_thumb has thumbnail image path.

tocase Optional.

Convert the value between cases. Possible values are

  1. upper --> to upper case
  2. lower --> to lower case
  3. capitalize --> first letter as capital
  4. capitalize-all --> first letter of each word as capital
fromleft Optional.

Number of characters to be displayed from left

format Optional.

To format the content data Formatting options are available for the attribute types:

  1. Date
  2. Number
locale A valid country code. Possible codes are:

AR | ZH | DE | EN | ES | FR | IT | JA | PT | RU

useformat Name of the previously declared format rule.

Example:

<zcms:dateformat id=”dtformat1” />

The name to be used for the attribute useformat is "dtformat1"

Example:

<zcms:attribute name=”dt” useformat=”dtformat1” />
highlight Optional.

String within the content data (substring) to be highlighted.

highlightclass Optional.

Style to be applied to highlighted area.

matchtype Optional.

The method to be applied to find the match with given "highlight" attribute’s value. Default value will be "EXACT_PHRASE".

Other possible value: "ANY_WORDS"

node This is used in xml and rss feeds. The name of node in xml or rss feed
usecdata This attribute is used to place the data inside [cdata]. This attribute is used in the feed, when the feed type is xml or rss
media Optional

The value can be “true” or “false”. If “false” media contents in the attribute will be not shown. The default value is “true”.


Example for using the content tag:

<zcms:content name="content" >
   <div>	
      <zcms:attribute name="author"/>
   </div>         
</zcms:content>


See also

Personal tools
Namespaces

Variants
Actions
Toolbox