Preview not worling as expected

Author Message

Thomas Brandl

Wednesday 30 April 2003 5:08:42 am

Hi,
Hitting the preview button while editing shows me an unexpected page first: it is no preview at all.
Ok, I then see I obviously have to choose the template/layout first in which I want my page to appear, but none of the offered layouts shows me the page as it really can be seen on the website (I'm working with the demo-site only).

What am I missing?
Thanks very much for your help!
Tom

Tony Wood

Wednesday 30 April 2003 6:34:45 am

You can set the layouts in the content.ini file. But we have found that preview pages don't work with customised pages.
Maybe eZ could comment?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Thomas Brandl

Friday 02 May 2003 12:37:25 am

That's exactely what one should expect from a preview, to view his content in his modified(!) layout. And imho there should be no option to see it in any other layout than it will appear on the website. Preview is supposed to be a control instance and it must not fool you!
This is sth. I notice with almost every OS CMS, they seem to mess up their priorities, which means they're working on high end super-duper features while forgetting to make the essential ones bullet-proof.

Hope there will be some enlightment on this matter..
Tom

Bård Farstad

Friday 02 May 2003 1:19:54 am

The preview function views the object. Since it's not published yet the node does not exist, i.e. the $node template variable is not available. So to make templates work with preview you need to make use of the variables: object, version, version_attributes. You can take a look in the full.tpl for example how to make this compatible with both preview and view.

That beeing said: since this will make overhead and more complexity when making templates I'm currently looking into making preview compatible with view. I will post the results in these forums when I commit the change to svn.

--bård

Documentation: http://ez.no/doc

Thomas Brandl

Friday 02 May 2003 2:29:45 am

Hi Bård,

I really don't want to slander eZ publish, maybe I'm not into it deeply enough (actually not at all since I'm evaluating different OS CMSs) to understand to problem about that matter. But it seems, that there is no real preview yet according to your explanation?
Anyway, I'll follow that subject a little while...

Cheeers
Tom

Bård Farstad

Friday 02 May 2003 2:42:26 am

I've just commited a change to the trunk ( to be 3.1 ) where you don't need to have any modifications to the templates for them to work nicely in the preview function.

The $node object is now available as you would expect, so your templates should work nicely with the preview setting.

--bård

Documentation: http://ez.no/doc

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.