Changing an objects value from page

Author Message

Matthew Rat

Thursday 05 June 2003 6:42:18 am

I set up an information collector of an integer/numeric type in a class that essentially extends the article class type. I would like to read the value and increment it by one every time that article is displayed. Is this easy or even possible given the current framework?

Bård Farstad

Thursday 05 June 2003 6:44:37 am

This can be done, but the problem is that you cache the view. This means that it will only be executed when it's not cached and hence the counter will not be correct.

--bård

Documentation: http://ez.no/doc

Matthew Rat

Thursday 05 June 2003 7:55:09 am

Ok, makes sense. How would I do such a thing (ignoring the glaring problem of caching)? I assume I FETCH the object somehow and then use a SET or something on it?

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 11:11:59
Script start
Timing: Jan 18 2025 11:11:59
Module start 'layout'
Timing: Jan 18 2025 11:11:59
Module start 'content'
Timing: Jan 18 2025 11:12:00
Module end 'content'
Timing: Jan 18 2025 11:12:00
Script end

Main resources:

Total runtime1.0943 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.0084 588.0313152.6406
Module start 'layout' 0.00840.0041 740.671939.4609
Module start 'content' 0.01251.0801 780.1328528.4063
Module end 'content' 1.09260.0017 1,308.53918.3125
Script end 1.0943  1,316.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.4608160.0003
Check MTime0.00270.2484160.0002
Mysql Total
Database connection0.00090.085810.0009
Mysqli_queries1.041095.1251570.0183
Looping result0.00070.0595550.0000
Template Total1.049195.920.5245
Template load0.00230.212620.0012
Template processing1.046795.652820.5234
Template load and register function0.00020.015910.0002
states
state_id_array0.00150.135210.0015
state_identifier_array0.00260.234420.0013
Override
Cache load0.00170.1515100.0002
Sytem overhead
Fetch class attribute can translate value0.00090.084120.0005
Fetch class attribute name0.00100.094940.0003
XML
Image XML parsing0.00080.075120.0004
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00100.0882170.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs