eZ Community » Forums » Developer » Fetch only updated node

Fetch only updated node

Fetch only updated node

Monday 26 August 2013 6:26:47 pm - 1 reply


How can i retrieve only updated node with a fetch ?

I tried something like : 

{def $last_updated = fetch( 'content', 'tree',                        hash( 'parent_node_id', ezini( 'ImportantNodeIDs', 'RootNodeID', 'asn.ini' ),                                'attribute_filter', array( array('modified','!=','published')),                                'limit', 4,                                'sort_by', array('modified', false())                            )                    )}

But it doesn't work.

Thanks for your help.

Modified on Monday 26 August 2013 6:27:48 pm by Léo Prada

Tuesday 27 August 2013 2:42:57 pm

Updated since when? What's the purpose here?

If you want any node that has been edited since creation, I would check version > 1. It might be possible to use 'attribute_filter', array( array('version','>',2)) (the documentation says no). If this is not supported, you will need to write an extended_attribute_filter for it.

You can of course use an 'attribute_filter', array( array('modified','>',$timestamp)), where $timestamp could be last time you checked.


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

36 542 Users on board!

Forums menu

Proudly Developed with from