Forums / Setup & design / fetching children of multiple nodes

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