Forums / Developer / change atribute value

change atribute value

Author Message

Nicolay Camargo

Friday 22 July 2005 1:45:44 pm

I read for 2 days about change atribute value in ezPublish. I didn't find somthing ease.
I found:
1.- Use template operator
2.- use php code
What is the best form to do that?
or Is there another way to do it?

Thanks In Advance:

Alberto Camargo

Thanks,

Nicolay
Corenet S.A.
Bogota - Colombia
www.corenet.net.co
acamargo@corenet.net.co

Luc Chase

Sunday 24 July 2005 12:52:04 pm

Alberto,
can you give an example of what you are trying to do?

The Web Application Service Provider

Nicolay Camargo

Wednesday 27 July 2005 3:09:28 pm

somthing like this, but without create a new operator, that is inside template language

function changeTotal ($idObjeto, $valor )
{

$object =& eZContentObject::fetch(238);
$objectData = &$object->dataMap();

$attr = &$objectData['total'];

$attr->setAttribute( 'data_int', intval($valor) );
$attr->store();

}

Thanks,

Nicolay
Corenet S.A.
Bogota - Colombia
www.corenet.net.co
acamargo@corenet.net.co