link to last published object in confirmation

Author Message

Robert Malevic

Friday 02 October 2009 7:55:39 am

Hi All,

When an anonymous user publishes an object via a form the user is redirected to a confirmation page. Depending on the value of some checkboxes the confirmation page provides feedback to the visitor.

To get these values I fetch the last published object

{def $last_published = fetch( 'content', 'list', hash( 'parent_node_id', 11184,
                                                                    'sort_by', array( 'modified', false() ),
                                                                    'limit', 1 )) }

By doing so I don't get the values in the object just published by the anonymous user but the values of the previous object.

How to solve this so I can retrieve values entered by the anonymous user?

Thanks!

Ɓukasz Serwatka

Friday 02 October 2009 8:08:26 am

Hi,

That confirmation page, is that a view cached node or custom module view? If you want to get last published node, then it is better to sort by 'published' keyword.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Robert Malevic

Friday 02 October 2009 8:24:20 am

I tried both published and modified, so it seems caching is the problem, but how to disable the view cache in the confirmation?
I'm still struggling with all the cache options :-)

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