Forums / General / sort unique children

sort unique children

Author Message

Milad P

Thursday 31 May 2007 11:07:52 am

I want to list my latest forum topics on the first page. Currently I use the fetch code below, but I get same topic back serveral times. How can i sort uniquelly in my node so that only one forum_reply from each forum_topic will be listed?

    {def $children = fetch('content', 'tree', hash('parent_node_id', 321, main_node_only, true(), class_filter_type, 'include', class_filter_array, array('forum_topic'), sort_by, array('modified', false()), limit,10 ))}

Bruce Morrison

Thursday 31 May 2007 4:20:36 pm

Hiya

Try adding

'main_node_only', true()

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Milad P

Friday 01 June 2007 12:53:19 am

I have tried that, but the problem is that every forum_reply has already a unique main_node_id.