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.

eZ debug

Timing: Jan 18 2025 19:38:16
Script start
Timing: Jan 18 2025 19:38:16
Module start 'layout'
Timing: Jan 18 2025 19:38:16
Module start 'content'
Timing: Jan 18 2025 19:38:17
Module end 'content'
Timing: Jan 18 2025 19:38:17
Script end

Main resources:

Total runtime0.8210 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0313152.6250
Module start 'layout' 0.00680.0025 741.656339.4453
Module start 'content' 0.00930.8101 781.1016515.0000
Module end 'content' 0.81940.0015 1,296.101612.1641
Script end 0.8209  1,308.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4319160.0002
Check MTime0.00140.1661160.0001
Mysql Total
Database connection0.00090.112710.0009
Mysqli_queries0.769893.7702600.0128
Looping result0.00060.0685580.0000
Template Total0.793296.620.3966
Template load0.00210.254820.0010
Template processing0.791196.363120.3956
Template load and register function0.00020.022010.0002
states
state_id_array0.00060.078110.0006
state_identifier_array0.00100.125820.0005
Override
Cache load0.00180.2186290.0001
Sytem overhead
Fetch class attribute can translate value0.00080.094020.0004
Fetch class attribute name0.00120.142850.0002
XML
Image XML parsing0.00060.076620.0003
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00090.1145160.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs