Fetching nodes with different parrent id

Author Message

Runar Skraastad

Monday 24 January 2005 1:05:02 pm

Hi!

I'm trying to fetch nodes in different folders with the same fetch command. I've searched around and found several comments on using array to do this. One is here: http://ez.no/community/forum/developer/fetching_content_from_multimple_nodes

But when i do this it produses no output.

The point of my code is to get hold of nodes wich has parent_node_id X or parrent_node_id Y and so on.

My test codes are:

{let children=fetch( content, list, hash( parent_node_id, array(82, 83)) )}

and

{set list_items=fetch_alias( children, hash( parent_node_id, array(82,83),
                                                             offset, $view_parameters.offset,
                                                             sort_by, $node.sort_array,
                                                             limit, $page_limit ) )}

Can any of you spot what I'm doing wrong or point me in the right direction?

Regards
RuS

Ɓukasz Serwatka

Monday 24 January 2005 1:56:25 pm

AFAIK the parent_node_id should be integer not array. But maybe i`m wrong ...

This should work ...

{section loop=array(82, 83)}
    {section loop=fetch( content, list, hash( parent_node_id, $item ) ) var=Child}
       {$Child.name}<br />
    {/section}
{/section}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Runar Skraastad

Monday 24 January 2005 2:42:37 pm

Thanks Luke, that brings me halfway there. But this vil bring up the children of 82 first and then of 83, but i want them to be sorted by newest first.

Regards
RuS

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.