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.

eZ debug

Timing: Jan 17 2025 21:53:23
Script start
Timing: Jan 17 2025 21:53:23
Module start 'layout'
Timing: Jan 17 2025 21:53:23
Module start 'content'
Timing: Jan 17 2025 21:53:23
Module end 'content'
Timing: Jan 17 2025 21:53:23
Script end

Main resources:

Total runtime0.0260 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 588.0391152.6406
Module start 'layout' 0.00710.0043 740.679739.4766
Module start 'content' 0.01140.0120 780.156397.4609
Module end 'content' 0.02330.0027 877.617238.3047
Script end 0.0260  915.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.5924140.0002
Check MTime0.00114.3457140.0001
Mysql Total
Database connection0.00145.205110.0014
Mysqli_queries0.003312.757030.0011
Looping result0.00000.111710.0000
Template Total0.00218.210.0021
Template load0.00124.441810.0012
Template processing0.00103.773610.0010
Override
Cache load0.00072.825410.0007
General
dbfile0.004718.123280.0006
String conversion0.00000.043040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs