Latest posts across forums

Author Message

Jason Filby

Tuesday 03 February 2004 9:07:51 pm

Hi

How can I retrieve the 5 latests posts across various forums?

Thanks
Jason

James Packham

Wednesday 04 February 2004 5:58:39 am

If the posts are in different subfolders then you can use a tree fetch like this:

{let LatestForums=fetch('content','tree',hash(
parent_node_id, node_id_of_forums_folder),
limit, 5,
class_filter_type, 'include',
class_filter_array, array('forum_class_name')))}

Regards,

~James~

Jason Filby

Wednesday 04 February 2004 9:57:09 am

Thanks James!

Note on a type (for anyone else that may try this) - this line:
node_id_of_forums_folder),

Should read (just drop the parenthesis):
node_id_of_forums_folder,

Cheers
Jason

James Packham

Thursday 05 February 2004 1:41:43 am

Oh yeah, sorry I just copied and pasted it from a template I was working on at the time and modified it...

~James~

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