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

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

eZ debug

Timing: Jan 18 2025 21:01:25
Script start
Timing: Jan 18 2025 21:01:25
Module start 'layout'
Timing: Jan 18 2025 21:01:25
Module start 'content'
Timing: Jan 18 2025 21:01:25
Module end 'content'
Timing: Jan 18 2025 21:01:25
Script end

Main resources:

Total runtime0.6307 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 587.8906152.6094
Module start 'layout' 0.00830.0027 740.500039.4141
Module start 'content' 0.01100.6179 779.9141530.1563
Module end 'content' 0.62890.0018 1,310.070312.1875
Script end 0.6307  1,322.2578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5364160.0002
Check MTime0.00130.2082160.0001
Mysql Total
Database connection0.00240.383210.0024
Mysqli_queries0.580792.0758570.0102
Looping result0.00050.0785550.0000
Template Total0.598694.920.2993
Template load0.00210.334120.0011
Template processing0.596594.576820.2983
Template load and register function0.00010.016010.0001
states
state_id_array0.00100.162510.0010
state_identifier_array0.00070.113520.0004
Override
Cache load0.00170.2764280.0001
Sytem overhead
Fetch class attribute can translate value0.00050.076920.0002
Fetch class attribute name0.00160.251540.0004
XML
Image XML parsing0.00160.247320.0008
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00190.3049160.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs