excluding a subtree in content fetch ?

Author Message

Roberto Frascarelli

Friday 25 February 2005 1:23:53 am

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.

Łukasz Serwatka

Tuesday 01 March 2005 11:17:22 pm

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.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Roberto Frascarelli

Wednesday 02 March 2005 1: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>)
in future releases, could be very useful .

Paul Borgermans

Wednesday 02 March 2005 2:10:07 am

Hi Roberto,

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

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Łukasz Serwatka

Wednesday 02 March 2005 2: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.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Roberto Frascarelli

Wednesday 02 March 2005 2:41:42 am

Done:

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

Robert Röttger@xrow.de

Thursday 28 July 2011 9:20:02 am

is this possible now 6 years later?

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

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