Wählen Sie Ihre Sprache:

<we:category>

Since version: - | Requires endtag: no

Description

This tag displays the category or categories assigned to a webEdition document. (See the "attribute" tab). If a document is associated with multiple categories, the categories are displayed separated by commas.

Specific

If the tag is used within <we:listview>, the category of the current <we:listview> entry is used. Thus, the attribute "doc" has no effect.

Attributes

delimiter

Default value: - | since version: - | required: no

Set this attribute to the delimiter you wish to use. If left unset, the system uses commas.


doc

Default value: - | since version: - | required: no

Setting this attribute to "self" instructs the tag to return the categories of the current webEdition document, even if it has been included in another document (see <we:include>). Setting this attribute to "top" instructs the tag to return the categories of the main webEdition document, even if the tag itself actually originates from a document which has been included (see <we:include>) into another webEdition document.

Allowed values:

  • self
  • top

showpath

Default value: false | since version: - | required: no

Setting this attribute to "true" displays the complete path to the category. Setting it to false or not setting it at all will only display the name of the category.

Allowed values:

  • true
  • false

rootdir

Default value: - | since version: 2.2.0.0 | required: no

Set this attribute to a value that is to be masked from the path if showpath="true". This is necessary, for example, if you have saved all categories in one directory called "New Categories". The system would then always display (for example) "/New Catagories/Sports/Tennis". If, however, you were to enter "/New Catagories" as a value in the rootdir attribute, then the system will return just "/Sports/Tennis".


field

Default value: - | since version: 3.5.0.0 | required: no

Set this attribute to the name of the field to be displayed.

Allowed values:

  • ID
  • Path
  • Title
  • Description

id

Default value: - | since version: 3.5.0.0 | required: no

Set this attribute to the ID of the category to be displayed.


separator

Default value: / | since version: 4.0 | required: no

Set this attribute to the seperator to appear between the categories. If the value of the attribute is empty or the attribute is unset, the seperator is set to "/" by default.


cachelifetime

Default value: 0 | since version: 4.2.0.0 | required: no

With this attribute you define the validity of the Cache in seconds for this we:Tag. This attribute is used only if cache type defined in the template is we:Tag Cache or Cache is disabled.


Syntax

<we:category [delimiter="attribute"] [doc="self|top"] [showpath="true|false"] [rootdir="attribute"] [field="ID|Path|Title|Description"] [id="attribute"] [separator="attribute"] [cachelifetime="attribute"] />

Examples

Example 1

<we:category tokken=" - " doc="top" showpath="true"/>

Example 2

See: <we:category/>

Example 3

<we:listview>
  <we:repeat>
    Category: <we:category token="/" showpath="true"/><br>
    Titel: <we:field name="Title" alt="we_path" hyperlink="on"/><br>
    Description: <we:field name="Description" alt="we_text" max="200"/><hr>
  </we:repeat>
</we:listview>