Access to ezselection-type attribute in a template

Author Message

E Hoelzler

Friday 01 December 2006 3:07:07 am

I have a class with an ezselection-type attribute (lets say attribute "fruit" with values "apple", "orange","ananas","banana") which may be multi-selected to assemble the ingredients of a fruit salad. Using the

{attribute_view_gui...}

I can easily display the value "orange ananas" if I have checked the second and the third. In the

$myobject.object.contentobject_attributes.content[0]

, for example, I get the indexnumber "1" indicating the second entry (namely: "orange"). Thus I can collect the indices of the entries, the user has checked (in our example index 1 and 2).

But: how can I access the string-content?

Or, in other words: How can I put the string "orange ananas" - or the single strings "orange" and "ananas" in to a template variable?

My Idea: in the contentclassattribute - object there is an attribute "content" with type "mixed" - perhaps it is somewhere behind this. But where?

Thanks a lot from munich for help!

Claudia Kosny

Friday 01 December 2006 2:49:00 pm

Hi

Haven't tried whether this is correct but as far as I know the string value of the selection is not stored in the contentobjectattribute, but only in the class definition. Check the comment here http://ez.no/doc/ez_publish/technical_manual/3_8/reference/datatypes/selection

Greetings from Luxembourg

Claudia

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.