how to list subitems including objects added as subitems with 'add location'?

Author Message

marc marc

Wednesday 01 December 2010 9:03:40 am

hello eZcommunity,

when i list subitems of a node, it seems that objects that were added as subitems from 'add location' are not included in this list.

here is my code:

{def $videofiles=fetch( 'content', 'list',
        hash(    
        'parent_node_id',  $videoThema.node_id ,
        'limit',3,
        'main_node_only', false()
             ) 
    )
}

main_node_only changes nothing here, true or false.

What is the problem here, and how is it possible to list all objects without exclusion?

i search on forums and found only this topic but with no concrete answer:

http://share.ez.no/forums/general/object-relations-and-add-locations
thank you in advance for any help!

Daisy Radix

Wednesday 01 December 2010 11:08:05 am

Hello,

Can you try this and tell us if you have all your subitems?

{def $videofiles=fetch( 'content', 'list', 
                        hash( 'parent_node_id',  $videoThema.node_id  ) 
                        )
}

eZ Publish certified developper :http://auth.ez.no/certification/verify/378142

Bertrand Dunogier

Wednesday 01 December 2010 2:38:03 pm

Your problem here is that sub-items are at node level, and therefore only belong to ONE node:

- node A
- subitem 1
- subitem 2
- subitem 3
- node B
- node A (secondary location for node A)

When listing subitems for node B, the only REAL subitem will be node A, but this node A doesn't have sub-items. Node A, the main node, does...

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

marc marc

Thursday 02 December 2010 8:10:46 am

thank you for your answers

but meanwhile i found my error, it was a Section problem: i affected one Section for each folder and i didn't add all this sections to the Anonymous policies, so i couldn't see videos on my page added from other folders(sections).

thanks again

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