FORUM: Adding a forum summary

Author Message

Eivind Marienborg

Monday 19 July 2004 3:51:42 am

I have a series of sub-forums, much like these community-forums at EZ.no. WHat I want is a summary with the latest topics/replies like the one presented at http://ez.no/community/forum . How do I do that?

Clay Pereira

Monday 19 July 2004 7:37:42 am

Hello,

Here is the code I use for summarising my folders. Replace my_forum_id with the node_id of your forum.

{let children=fetch( content,
                     list,
                     hash( parent_node_id,     my_form_id,
                           class_filter_type,  include,
                           class_filter_array, array( 'forum' ),
                           sort_by,            $node.sort_array ) ) }

	{section name=Child loop=$children sequence=array(bglight,bgdark) }

		      
			<div class="content-view-folder">
            
			{node_view_gui view=line content_node=$Child:item}

       				
   <ul>
       			    {let grandchildren=fetch('content',list,hash(parent_node_id,$Child:item.node_id, 'sort_by',array("name", true())))}
				
			    {section name=Grand loop=$:grandchildren}

<li><a href={$:item.url_alias|ezurl}>{$:item.object.data_map.name.content|wash}</li></a>
				
                  
			    {/section}
			    </ul>
	
			</div>
		
         {/section}

{/let}

Eivind Marienborg

Monday 19 July 2004 9:44:07 am

Works great! Thanks lots :D

Eivind Marienborg

Tuesday 20 July 2004 12:31:44 am

I did find it useful to add depth, 3, to include not only the topics, but the latest messages in each topic. Thanks again:)

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:21:52
Script start
Timing: Jan 18 2025 19:21:52
Module start 'layout'
Timing: Jan 18 2025 19:21:52
Module start 'content'
Timing: Jan 18 2025 19:21:53
Module end 'content'
Timing: Jan 18 2025 19:21:53
Script end

Main resources:

Total runtime0.7617 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.0067 587.9141152.6250
Module start 'layout' 0.00670.0029 740.539139.4453
Module start 'content' 0.00960.7507 779.9844514.7422
Module end 'content' 0.76030.0014 1,294.726612.1641
Script end 0.7617  1,306.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4276160.0002
Check MTime0.00140.1832160.0001
Mysql Total
Database connection0.00100.136810.0010
Mysqli_queries0.716994.1146600.0119
Looping result0.00050.0621580.0000
Template Total0.726695.420.3633
Template load0.00190.245120.0009
Template processing0.724795.139720.3623
Template load and register function0.00010.016310.0001
states
state_id_array0.00110.142910.0011
state_identifier_array0.00170.222720.0008
Override
Cache load0.00150.2010150.0001
Sytem overhead
Fetch class attribute can translate value0.00060.078020.0003
Fetch class attribute name0.00100.132750.0002
XML
Image XML parsing0.00050.065920.0003
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00080.1014160.0000
String conversion0.00000.001240.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs