Fetch with include and exclude

Author Message

John Smith

Saturday 24 September 2005 5:20:19 am

hi there,

Do any one know how to write fetch statement with include and exlude. I am trying to display the list of folders and articles, but I am getting folders, articles and the images related to the articles. I want to exclude that images.

Cheers.

Clemens T

Saturday 24 September 2005 5:54:42 am

Could you post your current fetch() statement?
thanks,
Clemens

Mazen Alsibai

Saturday 24 September 2005 7:19:43 am

{let name=Child
children=fetch('content','list',hash(parent_node_id,/*id_of_node*/,class_filter_type,include,class_filter_array,array('/*name of the class*/'))) }

John Smith

Monday 26 September 2005 1:56:19 am

Thanks for your help.

Here is my fetch statement. I want to exclude the images. Only want to fetch folder and articles list.

{let sub_children=fetch('content','list',hash(parent_node_id,$Child:item.node_id,limit, class_filter_type, "include", class_filter_array, array( 'folder', 'article' )))}

Thanks

Mazen Alsibai

Monday 26 September 2005 2:02:58 am

{let sub_children=fetch('content','list',hash(parent_node_id,$Child:item.node_id,limit,number_u_want,class_filter_type, 'exclude', class_filter_array, array( 'identifier of image class' )))}

John Smith

Monday 26 September 2005 2:10:58 am

Thanks I have sorted my problem. It was something wrong with nested loops.

But for general knowlegde, Is it possible to use include and exclude simultaneously within the fetch statement.

Cheers.

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 31 2025 01:29:42
Script start
Timing: Jan 31 2025 01:29:42
Module start 'layout'
Timing: Jan 31 2025 01:29:42
Module start 'content'
Timing: Jan 31 2025 01:29:42
Module end 'content'
Timing: Jan 31 2025 01:29:42
Script end

Main resources:

Total runtime0.0203 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1328151.2109
Module start 'layout' 0.00480.0041 739.3438220.6875
Module start 'content' 0.00890.0102 960.03131,001.6797
Module end 'content' 0.01910.0012 1,961.710933.9922
Script end 0.0203  1,995.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.7383140.0002
Check MTime0.00104.9211140.0001
Mysql Total
Database connection0.00073.509510.0007
Mysqli_queries0.002713.499630.0009
Looping result0.00000.049310.0000
Template Total0.00094.310.0009
Template load0.00073.229110.0007
Template processing0.00021.009110.0002
Override
Cache load0.00042.126110.0004
General
dbfile0.00021.033780.0000
String conversion0.00000.036440.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.0001 secs