Fetch content tree - strange or normal behavior?

Author Message

Piotrek Karaś

Wednesday 07 May 2008 4:29:56 am

Hi,

I want to fetches a tree of nodes of certain classes recursively, and thought using content tree fetch would be the best option. Unfortunately, a strange thing happened. Let's say we have articles (A) and folders (F). I fetch a tree asking <b>only</b> for articles. Now imagine this structure:

# A
# A
# A
# F
## A
## A

Now what the tree fetch returns is:

# A
# A
# A
## A
## A

Why? How can I fetch the same type of information, but without exploring subtrees that I should not have access? I expect this:

# A
# A
# A

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Wednesday 07 May 2008 5:15:29 am

Didn't you expect to get all articles in the sub tree structure that you have read access to??

If you only want to fetch as in your last example, use 'list'.

If you want to fetch recursively where you only want articles as children of articles, then you have to create your own logic for that.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Piotrek Karaś

Wednesday 07 May 2008 8:05:47 am

When I think 'recursive', then I mean structure (with its consequences). When I think list, then I think whatever filtering rules there are available... Anyway - this means work ;)

Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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