Forums / Developer / Listing of Articles in folder
Majkl Najt
Tuesday 31 August 2004 4:13:57 pm
Hi!
I created new class. Also amde template for it and it works. Now I created folder in this object where I am storing Articles in it. I want to display now article titles in template for this class. But to list all articles I need to put in id of the folder, which contains articles.This code works as I wanted, but only becasuse I gave node ID 230 in it. How to get ID of the folder from template?
{section loop=fetch( content, list, hash( parent_node_id, 230, class_filter_type, include, class_filter_array, array( 'article' ), sort_by,array(published,false()), limit, 6) ) } <li> {$item.object.published|l10n(shortdate)}<a href={$item.url_alias|ezurl}>{$item.object.data_map.title.content}</a></li> {/section}
Thanks!
Majkl
Wednesday 01 September 2004 12:58:30 am
I managed to get somehow node ID. Well printing it out with this code
{let folder_list=fetch( content, list, hash(parent_node_id, $node.node_id,sort_by, array( array( priority ))))} <ul> {section name=Folder loop=$folder_list} <li><a href={concat("/",$Folder:item.url_alias)|ezroot}>{$Folder:item.node_id|wash}</a></li> {$folder_list.node_id} {/section} </ul>
Bot now how to transfer item.node_id to my other section?