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.