eZ Community » Forums » Developer » How to get value of the selection...
expandshrink

How to get value of the selection datatype

How to get value of the selection datatype

Friday 29 May 2009 5:06:12 pm - 2 replies

Hello,

I want to kown how can i get the value of an attribute of the datatype selection by programmation?

$v=eZContentObjectTreeNode::subTreeByNodeID(
        array(  'ClassFilterType' => 'include',
                'ClassFilterArray' => array('newsletter'),// identifiant of the content classe
                'Depth' => 1,
                'DepthOperator' => 'eq'),
       233//node_id of the  parent
);


foreach ( $v as $o )
{

 $dataMap =& $o->dataMap();
        $nom =& $dataMap['country']->content();
               
	      echo $nom;
	      

}

the attribute name "nom" have the datatype "selection ".

i try with the function content() but i have like the result "array"

thanks in advance.

Wednesday 05 August 2009 12:48:36 pm

Take a look at "ezselectiontype.php"
in .../kernel/classes/datatypes/ezselection/

There should be a function which gets the options and current value.

Wednesday 05 August 2009 7:44:25 pm

Hi,

You can always make a

vardump( $dataMap['country'] );

or

vardump( $nom );

, and look into the object/array structure

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from