incrementing an object attribute... please help

Author Message

Hugo Siles

Thursday 08 April 2004 2:02:43 pm

Hi, i want to know if it's posible to change the value of one object in one node. For example, I have extended the article class, now it has a new intenger attribute, what I want is that this attribute get incremented every time the node it's viewed.

In the template for viewing this article I put something like this

{set $node.data_map.volumen.data_int = inc($node.data_map.volumen.data_int) }

where volume is the integer attribute that I want to increment.. I'd apreciate any idea

thanks

Hugo

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 19 2025 01:16:02
Script start
Timing: Jan 19 2025 01:16:02
Module start 'layout'
Timing: Jan 19 2025 01:16:02
Module start 'content'
Timing: Jan 19 2025 01:16:02
Module end 'content'
Timing: Jan 19 2025 01:16:02
Script end

Main resources:

Total runtime0.8132 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 590.4219152.6406
Module start 'layout' 0.00620.0033 743.062539.4766
Module start 'content' 0.00950.8025 782.5391400.0469
Module end 'content' 0.81200.0011 1,182.58598.1250
Script end 0.8131  1,190.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4051160.0002
Check MTime0.00130.1612160.0001
Mysql Total
Database connection0.00110.132410.0011
Mysqli_queries0.776395.4691460.0169
Looping result0.00040.0491440.0000
Template Total0.778695.720.3893
Template load0.00220.271820.0011
Template processing0.776495.473820.3882
Template load and register function0.00010.015410.0001
states
state_id_array0.00120.148810.0012
state_identifier_array0.00130.161320.0007
Override
Cache load0.00180.221190.0002
Sytem overhead
Fetch class attribute can translate value0.00050.066110.0005
Fetch class attribute name0.00050.062910.0005
XML
Image XML parsing0.00010.013610.0001
class_abstraction
Instantiating content class attribute0.00000.000610.0000
General
dbfile0.00060.0770100.0001
String conversion0.00000.001040.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs