Forums / Developer / More rapid (hackish) development possible?

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

eZ debug

Timing: Jan 31 2025 03:25:35
Script start
Timing: Jan 31 2025 03:25:35
Module start 'content'
Timing: Jan 31 2025 03:25:35
Module end 'content'
Timing: Jan 31 2025 03:25:36
Script end

Main resources:

Total runtime0.3459 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.0469370.2891
Module start 'content' 0.00740.0138 958.33591,001.5781
Module end 'content' 0.02130.3246 1,959.91413,891.5391
Script end 0.3459  5,851.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00451.3133200.0002
Check MTime0.00140.4063200.0001
Mysql Total
Database connection0.00090.246910.0009
Mysqli_queries0.241769.86221410.0017
Looping result0.00160.45091390.0000
Template Total0.324193.710.3241
Template load0.00070.215110.0007
Template processing0.323493.481710.3234
Override
Cache load0.00050.150610.0005
Sytem overhead
Fetch class attribute can translate value0.00230.652510.0023
XML
Image XML parsing0.00030.074310.0003
General
dbfile0.01163.3651200.0006
String conversion0.00000.001730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs