One fetch for several Folders

Author Message

Leandro Alves

Wednesday 30 June 2004 8:35:18 am

Hi!

I am trying to use one fetch for several folders, but I have a problem!

I have this structure:

Root Folder (node_id = 2)
|_Sales
...|_News (node_id = 10)
......|article 1
......|article 2
...|_Documents
......|article X
|_Account
...|_News (node_id = 20)
......|article 3
......|text 1

I want to fetch all articles that are only in both folders "News" (Node 10 and 20)..

I don't want any of others articles...

I tried with the <i>search operator</i> with this code, but it didn't resolve my problem:

{let search=fetch(content,search,hash(text,'article',subtree_array, array(10,20)))}

{section var=SearchResult loop=$search['SearchResult']}
<a href={$SearchResult.item.url_alias|ezurl}>{$SearchResult.item.name|wash}</a>
{attribute_view_gui attribute=$SearchResult.object.data_map.intro}
{/section}

{/let}

<b>Problem</b>

1. The parameter text in search operator is required, so What can I do to fetch ALL articles in both folders??
In this case the fetch only catch the article with the "article" word, but not all. The fetch didn't catch the article "text 1" in "Account/News"...

For test I changed my site.ini.append allowing empty searches but it didn't work with the fetch operator too...

[SearchSettings]
AllowEmptySearch=enabled

I tried several forms in "(text,'article')"...
One of its:
{let search=fetch(content,search,hash(text,'', subtree_array, array( 10, 20 )))}

But nothing worked...

I prefer don't allow empty searches, It was only a test...

What can I do in this case?

<b>Is there other form to fetch all articles in the specific folders?</b>

Thanks a lot!
Leandro

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 19 2025 00:34:50
Script start
Timing: Jan 19 2025 00:34:50
Module start 'layout'
Timing: Jan 19 2025 00:34:50
Module start 'content'
Timing: Jan 19 2025 00:34:51
Module end 'content'
Timing: Jan 19 2025 00:34:51
Script end

Main resources:

Total runtime1.4820 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 587.9141152.6250
Module start 'layout' 0.00670.0049 740.539139.4453
Module start 'content' 0.01161.4688 779.9844413.1172
Module end 'content' 1.48040.0015 1,193.10168.1641
Script end 1.4819  1,201.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.2889160.0003
Check MTime0.00150.1002160.0001
Mysql Total
Database connection0.00070.046610.0007
Mysqli_queries1.433196.7048460.0312
Looping result0.00050.0353440.0000
Template Total1.436796.920.7183
Template load0.00260.172820.0013
Template processing1.434196.772220.7171
Template load and register function0.00010.008610.0001
states
state_id_array0.00190.126410.0019
state_identifier_array0.00150.104020.0008
Override
Cache load0.00210.1416350.0001
Sytem overhead
Fetch class attribute can translate value0.00060.037610.0006
Fetch class attribute name0.00050.032610.0005
XML
Image XML parsing0.00020.011110.0002
class_abstraction
Instantiating content class attribute0.00000.000310.0000
General
dbfile0.00080.0534100.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs