Search code examples
ezpublish

eZPublish - how to get Selection value?


I created (in admin) a selection field called color. Now I can't access it. When I run {$note.data_map.color.content|attribute(show)} it prints value. But I can't access it without attribute(show). What can I do?


Solution

  • eZSelection's content is an array, access the 0 key on content to get the value.

    {$node.data_map.email_option.content.0}