eZ Community » Forums » Developer » Difference between main_node_id and...

Difference between main_node_id and object_id

Difference between main_node_id and object_id

Sunday 06 December 2015 4:00:22 am - 1 reply



It would be greatly appreciated if you share your knowledge about the difference between main_node_id and object_id.


what's the difference between the following codes?

1. {cache-block keys=array($current_user.contentobject_id) expiry=0 subtree_expiry=$current_user.contentobject.main_node_id}

2. {cache-block keys=array($current_user.contentobject.main_node_id) expiry=0 subtree_expiry=$current_user.contentobject.main_node_id}


Thank you very much for your time to look at this.

Thursday 14 January 2016 10:21:22 am


The object_id is the unique id of a content.

The main_node_id is the unique id of the content main location in the content tree.

See https://doc.ez.no/eZ-Publish/Tech.../Content-management/The-content-node

*** If you create a cache block with $current_user.contentobject.main_node_id key, It will generate a cache for each location of $current_user. *** --> no it's wrong! sorry

See also https://doc.ez.no/eZ-Publish/Tech...-functions/Miscellaneous/cache-block

Modified on Thursday 21 January 2016 9:23:40 am by Luca Realdi


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

36 542 Users on board!

Forums menu

Proudly Developed with from