getting the value out of a selection datatype

Author Message

nicholas king

Friday 24 September 2010 1:59:02 am

Hello all, i am really struggling with getting the value out of the selection datatype into my template.

So far i have the following code. where briefing_area is the name of the selection datatype.

{$node.data_map.briefing_area.content}

all this prints out on screen is array although there is only one value inside the selection.

does anyone have a idea how i can get the string value out of the datatype.

Thanks

Nicholas

Abdelkader RHOUATI

Friday 24 September 2010 2:19:31 am

Hi,

If you are can't do it, let ez do it in your place ;).

there are a magic template operator attribute_view_gui, you can use it with every attribute, specially with complex one, like your selection.

the syntax is :

{attribute_view_gui  attribute=$node.data_map.briefing_area}

(for more information look at the template : /design/standard/templates/content/datatype/view/ezselection.tpl, the operator template attribute_view_gui will use it to display attribute selection)

TKS.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

nicholas king

Friday 24 September 2010 2:23:04 am

Brilliant,

thank you very much Abdelkader.

that works a treat :-D

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