You are now viewing the documentation of eZ Publish legacy (4.x series and the legacy "stack" in 5.x). For 5.x versions this documentation must be complemented with the latest, more current documentation available at confluence.ez.no. Happy learning!

Selection

Summary

Stores single and multiple choices.

Properties

NameInternal nameSearchableInformation collector
Selection ezselection Yes. No.

Description

This datatype allows the storage of single or multiple option selections. The options must be defied on the class level. This datatype can for example be used to define different categories for news articles (as shown in the example below: "Local", "National", etc.). The following screenshot shows the class attribute edit interface for this datatype.

Class attribute edit interface for the "Selection" datatype.

Class attribute edit interface for the "Selection" datatype.

Style

The "Style" parameter controls the behavior of the object attribute edit interface. It can be either "Single" or "Multiple". While "Single" means that the object attribute edit interface will only allow a single selection, the "Multiple" setting allows the selection of multiple options.

Options

The "Options" interface allows the specification of the options that should be available for selection when an object is edited. The options are identified by an identification number. The identification number of the first option is zero. Please note that the system does not give any warning if an option that is used is removed. In other words, removing options may result in an inconsistent database.

Object attribute edit interface

The following screenshot shows the object attribute edit interface for this datatype.

Object attribute interface for the "Selection" datatype.

Object attribute interface for the "Selection" datatype.

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns an array of the identification numbers (as strings) of the selected options.

Balazs Halasy (21/02/2005 3:42 pm)

Balazs Halasy (29/04/2005 4:20 pm)


Comments

  • Raw output of selection (mutltiple)

    <ul>
    {for 0 to $node.object.data_map.options02.content|count()|dec as $counter}
    <li> ID : {$node.object.data_map.options02.content[$counter]} - VALUE : {$node.object.data_map.options02.class_content.options[$node.object.data_map.options02.value[$counter]].name}</li>
    {/for}
    </ul>
  • How can I insert in selection attribute option an item of another class ???

    How can I insert in selection attribute option an item of another class ???

    example :
    Class "Team" ........attribute "name", etc.........

    Class "result" ..... attribute "Team A", "Team B", etc

    I'd like to have attributes "Team A" and "Team B" with a selection attribute option with list of attribute "name" in Class Team"