setAttribute data_text for xml blocks

Author Message

K C

Monday 22 August 2005 3:24:56 am

Hi,

I have the following code :

$dataTypeString = $attribute->attribute('data_type_string');
						
switch( $dataTypeString ) 
{
	case 'ezinteger' :
		$attribute->setAttribute("data_int",intval($data));
		break;
	case 'ezstring' :
	      	$attribute->setAttribute("data_text",$data);
	       	break;
	case 'ezurl' :
	      	$attribute->setAttribute("data_text",$data);
	       	break;					            
	case 'ezxmltext' :
	       	$attribute->setAttribute("data_text",$data);
	      	break;
	default :
	        eZDebug::writeDebug( 'data_type_string: ' . $dataTypeString . ' not supported', 'testmodule' );
}
$attribute->store();

$attribute is an object from the class ezcontentobjectattribute.

Everythings works except when the $dataTypeString is 'ezxmltext'.

Does someone see what I'm doing wrong ?

Thanks a lot!

KC

K C

Monday 22 August 2005 8:03:21 am

Ok, I've found the answer on
http://ez.no/products/ez_publish_cms/documentation/development/importing_attribute_data

:)

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