More rapid (hackish) development possible?

Author Message

Oliver Frommel

Wednesday 12 September 2007 3:02:06 am

Hi,

while I appreciate the clear structure of the eZpublish system and the fact that it enforces a clear structure on your own web development, I sometimes wish it'd allow for some more quick and dirty solutions.

For instance I had to expose a single attribute of an object to be accessible over the web. It is supposed to be a numeric value with no HTML markup. It took me some time to make this possible, because I had to figure out how override the standard templating system. Overriding the node template does not work because the pagelayout template adds its own markup. Overriding the pagelayout I had to find a way to access the node data. It worked in the end but it would have been easier to just disable the whole template system at this point. Is something like this possible? Maybe in an extension?

I have been using Zope in the past, and while I don't want to compare both systems in detail, Zope offers some very simple solutions for simple tasks. For instance you can just use the operator <dtml-var> to output values of the current context (that might be an object or a directory etc). With another expression I can iterate over objects and create a simple CSV export in two lines:

<dtml-in addresses>
<dtml-var firstname>;<dtml-var surname>;<dtml-var zip>;<dtml-var city>
</dtml-in>

I know how I can do something like this in eZ templates but then I am tied to the template engine again. Is there a way to make things like this possible in eZ? Or maybe I am just stuck in some non-eZ way of thinking.

Best
Oliver

Peter Putzer

Wednesday 12 September 2007 5:35:15 am

You can use layout/set for this.

For example, my RSS feeds are generated by the URL <site_access>/layout/set/rss/content/view/rss/<node_id>. Of course these use some markup, but it's completely customized by the pagelayout and view mode (both called "rss" in this example). Using the URL translator, you have complete control over your output.

Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at

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:10:26
Script start
Timing: Jan 18 2025 21:10:26
Module start 'layout'
Timing: Jan 18 2025 21:10:26
Module start 'content'
Timing: Jan 18 2025 21:10:27
Module end 'content'
Timing: Jan 18 2025 21:10:27
Script end

Main resources:

Total runtime0.7524 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.0313152.6406
Module start 'layout' 0.00500.0023 740.671939.4766
Module start 'content' 0.00730.7437 780.1484523.9297
Module end 'content' 0.75100.0014 1,304.07818.1250
Script end 0.7524  1,312.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3977160.0002
Check MTime0.00120.1650160.0001
Mysql Total
Database connection0.00070.094010.0007
Mysqli_queries0.710994.4856540.0132
Looping result0.00050.0624520.0000
Template Total0.727396.720.3637
Template load0.00190.256820.0010
Template processing0.725396.400620.3627
Template load and register function0.00020.020710.0002
states
state_id_array0.00070.088910.0007
state_identifier_array0.00090.120820.0005
Override
Cache load0.00150.2035170.0001
Sytem overhead
Fetch class attribute can translate value0.00050.065720.0002
Fetch class attribute name0.00080.106730.0003
XML
Image XML parsing0.00060.086320.0003
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00170.2223160.0001
String conversion0.00000.000840.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs