fetching children of multiple nodes

Author Message

Marko Žmak

Friday 29 April 2005 4:42:09 pm

I wan't to supply fetch with an array of nodes, and get all the nodes that have a parent node in that array. How do I do that?

As far as I could find out, fetch allows to specify only one parent_node_id, how can I make it to use two or more parent node ids?

P.S. And I want to do it with only one fetch.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Michael Zeidler

Sunday 01 May 2005 12:21:05 pm

Hello Marco,

take a look at this bug I have commited today: http://ez.no/community/bugs/fetch_content_list_no_data_fetching_with_an_array_of_node_ids_for_parent_node_id
There you can also find this example:

{let id_array=array(174, 175)}
 {let fetched_array=fetch( 'content', 'list', hash( 'parent_node_id', $id_array ) )}
<br>HELP:{$fetched_array|attribute(show)}
 {/let}
{/let}

I use the 3.5 stable SVN-tree.

Additional related Links:
http://ez.no/community/bugs/problems_with_fetching_from_multiple_nodes
http://ez.no/community/forum/developer/fetching_content_from_multimple_nodes

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

Marko Žmak

Sunday 01 May 2005 3:49:27 pm

Hm... when did you report this bug and did you get any answers a bout it? I tried something similar in previos versions of eZ and it didn't work. I didn't see that part of documentation so I didn't think it was a bug.

It would be very nice to see this bug fixed...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Michael Zeidler

Tuesday 03 May 2005 6:50:28 am

Hello Marko,

it seems that Jan has fixed the bug. But if you use the core 3.5 stable svn-repository its not commited there. But just have a look on the reported bug (http://ez.no/community/bugs/fetch_content_list_no_data_fetching_with_an_array_of_node_ids_for_parent_node_id). I have fixed the bug myself, which is explained.

Cheers

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

Frederik Holljen

Tuesday 03 May 2005 7:06:12 am

SEAwolfx,

The fix was commited in all active branches in svn. However, pubsvn is a copy of the master svn server and it is usually lagging a few hours. Just wait and the fix will show up.

Frederik

Marko Žmak

Tuesday 03 May 2005 3:42:43 pm

Great I can't wait to test it. Is this bugfix available in the standard tar.gz download (eZ publish distributions)?

Also is there a patch that can be applied to previous versions of eZ?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Michael Zeidler

Wednesday 04 May 2005 3:22:36 am

Either you follow my recommendations to fix the bug as given in the bug report (jan has done nearly the same, he uses "OR" an I use "||") or you have to use SVN to checkout the bleeding edge of development. ;)

Cheers!

-------------------------------------------------------------------------------------------
join #ezpublish on irc.freenode.org

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 08:06:56
Script start
Timing: Jan 31 2025 08:06:56
Module start 'layout'
Timing: Jan 31 2025 08:06:56
Module start 'content'
Timing: Jan 31 2025 08:06:56
Module end 'content'
Timing: Jan 31 2025 08:06:56
Script end

Main resources:

Total runtime0.0168 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.0057 588.2500151.2266
Module start 'layout' 0.00570.0033 739.476636.6641
Module start 'content' 0.00900.0061 776.140698.2656
Module end 'content' 0.01520.0016 874.406337.9922
Script end 0.0167  912.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.5242140.0002
Check MTime0.00116.6449140.0001
Mysql Total
Database connection0.00074.020810.0007
Mysqli_queries0.003721.917230.0012
Looping result0.00000.101010.0000
Template Total0.00116.710.0011
Template load0.00095.131610.0009
Template processing0.00031.568810.0003
Override
Cache load0.00063.429110.0006
General
dbfile0.002011.739480.0002
String conversion0.00000.058340.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