eZ Community » Forums » Setup & design » excluding a subtree in content fetch ?
expandshrink

excluding a subtree in content fetch ?

excluding a subtree in content fetch ?

Friday 25 February 2005 10:23:53 am - 6 replies

I have to perform a Node tree fetch excluding a specified subtree starting
from a known node.
There exists an option in tree fetching to exclude a branch of the fetched tree
(or a site section) or do have I to perform two fetches and after perform an array remove between the two results? Thanks in advance for answers.

Wednesday 02 March 2005 8:17:22 am

Hi Roberto,

Yes, you can do this by creating right array with node_ids from two fetch results. Then using sections and node fetching view data.

Wednesday 02 March 2005 10:45:54 am

Thanks Lukasz,
I solved my problem in a not very clean way, performing a complete subtree fetch
and excluding the visualization of unwanted nodes during the loop section.

I tried to remove elements before the loop using <i>merge</i> and after <i>unique</i> array operators, but it seems that doesn't work.
I don't know if it's because elements of the array are complex objects
and not simple datatype values.

I think adding a node filtering option to the fetch parameters (like <b>node_filter_type</b>(include/exclude) and <b>node_filter_array</b>blunk.gif Emoticon
in future releases, could be very useful .

Wednesday 02 March 2005 11:10:07 am

Hi Roberto,

Good suggestion, I'll have a look at it since I need it here too.

-paul

Wednesday 02 March 2005 11:13:43 am

Hi Roberto,

It`s good to see that you solved your problem.

I think adding a node filtering option to the 
fetch parameters (like node_filter_type(include/exclude) 
and node_filter_array) in future releases, could be very useful

Could you add this as your suggestion?

Thank you.

Modified on Wednesday 02 March 2005 11:15:35 am by Ɓukasz Serwatka

Wednesday 02 March 2005 11:41:42 am

Done:

id = 6285 New suggestion: adding node filtering options in fetch

Thursday 28 July 2011 6:20:02 pm

is this possible now 6 years later?

couldn't find it in doc or maybe i was just blind.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from