Forums / Setup & design / Fetching the enum object value
Sander Jansen
Thursday 02 October 2003 1:33:08 am
I want to use the value of an enum datatype in a switch operator... so far I figured out access to the object with $content_version.data_map.<attribute_name>.content, but how do I access the actual value?
Tony Wood
Thursday 02 October 2003 2:02:00 am
Hi Sander,
This can be found in ezenum.tpl. I have changed the example to show enumvalue not enumelement that is in the original file.
{section name=EnumObjectList loop=$attribute.content.enumobject_list sequence=array(bglight,bgdark)} {$EnumObjectList:item.enumvalue|wash(xhtml)}<br />{/section}
Tony Wood : twitter.com/tonywood Vision with Technology Experts in eZ Publish consulting & development Power to the Editor! Free eZ Training : http://www.VisionWT.com/training eZ Future Podcast : http://www.VisionWT.com/eZ-Future
Thomas Brandl
Thursday 02 October 2003 5:22:05 am
use attribute_view_gui instead. That's exactly, what that function is for, namly displaying an objects attribute - and you don't need to care, what type it is.