Editing page

Author Message

ez man

Monday 30 April 2007 5:45:47 am

i want to add page with contact details on but i want it to be editable ..
That is, i want to know how you can change dynamically using code instead of hard coding it.

My contents are stored in design/override/templates in a file called events.tpl and i have hard coded contents

"Contact us
xyz
+1-666-666-6666(off)
+1-555-555-5555(mobile)"

I want to put this content into ezpublish.

that is to say that contents should be made dynamic

I got a suggestion:
extend your content class 'event' with a new textfield or a nother ez datatype. Then you can write this information to the content objekt and you can have access on it in the template over e.g {attribute_view_gui ... }
but where can i see the class 'event'
Any help?

Betsy Gamrat

Monday 30 April 2007 9:19:23 pm

ez man,

The suggestion is exactly what you need to do.

Go to Setup > Classes > Content and edit the class that is displayed with events.tpl. Add an XML Block, or a text block.

Next, go back to your template (events.tpl) and add the following line:

{attribute_view_gui attribute=$node.data_map.id_of_text_attribute}

Then, edit the node that is being displayed to add the content in the field.

Good luck

ez man

Monday 30 April 2007 11:08:42 pm

I added new attribute as you suggested and got id 417
Then in events.tpl file i added

{attribute_view_gui attribute=$node.data_map.417}

but how do i edit the contents?
it is not getting displayed in web page

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 14:56:05
Script start
Timing: Jan 18 2025 14:56:05
Module start 'layout'
Timing: Jan 18 2025 14:56:05
Module start 'content'
Timing: Jan 18 2025 14:56:06
Module end 'content'
Timing: Jan 18 2025 14:56:06
Script end

Main resources:

Total runtime0.9566 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.0050 587.7891152.6094
Module start 'layout' 0.00500.0034 740.398439.3984
Module start 'content' 0.00840.9466 779.7969507.9375
Module end 'content' 0.95490.0016 1,287.73448.2031
Script end 0.9565  1,295.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3297160.0002
Check MTime0.00120.1289160.0001
Mysql Total
Database connection0.00080.083710.0008
Mysqli_queries0.907294.8364570.0159
Looping result0.00050.0560550.0000
Template Total0.923996.620.4620
Template load0.00250.257520.0012
Template processing0.921496.327020.4607
Template load and register function0.00020.020910.0002
states
state_id_array0.00130.140710.0013
state_identifier_array0.00100.105320.0005
Override
Cache load0.00210.2187310.0001
Sytem overhead
Fetch class attribute can translate value0.00060.061120.0003
Fetch class attribute name0.00090.095740.0002
XML
Image XML parsing0.00330.340020.0016
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00230.2367160.0001
String conversion0.00000.000540.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
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/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
2content/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: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs