Change the contents of a object attribute

Author Message

David Santiso

Monday 18 April 2011 10:42:57 am

Hi,

How can I change the contents of the object attribute by pressing a button?

For example, I'm on the template that displays the contents of an object and one of its attributes is an integer. I want to put a button that when pressed the integer content changes to another value.

Thanks,

David

Theodoros Papageorgiou

Wednesday 20 April 2011 4:17:03 am

Hi David,

You can use the attribute edit interface:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Template-functions/Visualization/attribute_edit_gui

Enable template debugging to see which attribute edit template you need to override.

WEBWiZ
Web Development
http://www.webwiz.gr

David Santiso

Wednesday 20 April 2011 8:17:05 am

Yes, but how do I save the new content?

I also want to modify it without showing the edit interface.

Thanks,

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 10:24:46
Script start
Timing: Jan 18 2025 10:24:46
Module start 'layout'
Timing: Jan 18 2025 10:24:46
Module start 'content'
Timing: Jan 18 2025 10:24:48
Module end 'content'
Timing: Jan 18 2025 10:24:48
Script end

Main resources:

Total runtime1.5712 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.0075 589.1797152.6406
Module start 'layout' 0.00750.0038 741.820339.4844
Module start 'content' 0.01131.5582 781.3047529.3125
Module end 'content' 1.56950.0017 1,310.61728.2813
Script end 1.5712  1,318.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.1988160.0002
Check MTime0.00130.0838160.0001
Mysql Total
Database connection0.00080.050810.0008
Mysqli_queries1.517996.6073570.0266
Looping result0.00060.0377550.0000
Template Total1.533997.620.7669
Template load0.00170.108620.0009
Template processing1.532297.512520.7661
Template load and register function0.00020.012410.0002
states
state_id_array0.00110.070910.0011
state_identifier_array0.00080.053020.0004
Override
Cache load0.00140.0872180.0001
Sytem overhead
Fetch class attribute can translate value0.00080.050520.0004
Fetch class attribute name0.00120.076140.0003
XML
Image XML parsing0.00250.157620.0012
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00350.2227150.0002
String conversion0.00000.000740.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