eZ Community » Forums » General » Preview not worling as expected
expandshrink

Preview not worling as expected

Preview not worling as expected

Wednesday 30 April 2003 2:08:42 pm - 5 replies

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

Wednesday 30 April 2003 3:34:45 pm

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?

Friday 02 May 2003 9: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

Friday 02 May 2003 10: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

Friday 02 May 2003 11: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

Friday 02 May 2003 11: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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from