ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

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 2:42 pm)

Balazs Halasy (29/04/2005 2: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"
  • Translate option

    Is there any possibilities to translate the options,rather then select another option as translation?
    As you all known,currently we can only select trhe translation from the option.

    Thank you very much
  • Translationg ezselection

    Hi,

    Open Net wrote a short guide on how to achieve translation for this datatype
    http://www.open-net.ch/fre/CMS-eZ...s/Translate-an-ezselection-attribute
  • Images?

    Hi,
    is there a possibility to re-upload the images related to the article?

    Thank you.
  • default selection ?

    there seems to be no way to specify a default selected option. The edit gui defaults to the first specified option, depending on the browser.

    $2c,
    *-pike