Share » Forums » Setup & design » FORUM: Adding a forum summary

FORUM: Adding a forum summary

FORUM: Adding a forum summary

Monday 19 July 2004 3:51:42 am - 3 replies

Modified on Monday 19 July 2004 3:52:15 am by Eivind Marienborg

Author Message

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:)

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu