| Siniša Šehović
                                                                                                                             | Wednesday 07 December 2005 12:00:44 am 
                                                                 Hi Ben Thanx for quick reply! Yes that's what I was looking for :-) Btw, is it possible to filter object by date of publish and class_id? 
Best regards,S.
 ---If at first you don't succeed, look in the trash for the instructions.
 | 
                                                                                                    
                                                        |    
                                                                                                                             | Wednesday 07 December 2005 1:54:37 am 
                                                                 Yes it's possible. Here's a complete example from one of my sites: 
{* Grab all the news articles. *}
{*
{let children=fetch( content,
                     list,
                     hash( parent_node_id, $node.node_id,
                           sort_by, $node.sort_array,
                           class_filter_type, include,
                           class_filter_array, array( 'article' )
                         )
                    )
}
*}
<h2>2005</h2>
{let year=2005
     firstSecond=maketime(0,0,0,1,1,$year)
     lastSecond=maketime(23,59,59,13,0,$year)
     children=fetch( content,
     list,
     hash( parent_node_id, $node.node_id,
        sort_by, $node.sort_array,
        class_filter_type, include,
        class_filter_array, array( 'article' ),
        attribute_filter, array( 'and', array( 'published', between, array( $firstSecond, $lastSecond ) ) )
        )
     )
}
<table class="news_archive" width="100%">
    <tr>
        <th>
            <b>Artikkeltittel</b>
        </th>
        <th>
            <b>Publisert</b>
        </th>
    </tr>
    {* Loop through all articles that we just fetched. *}
    {section name=Child loop=$children}
    <tr>
        <td>
            {* Display a link to the article. *}
            <a href={$:item.url_alias|ezurl}>{$:item.name}</a>
            <br />
        </td>
        <td>
            {* Display the date the article was published. *}
            {$:item.object.published|l10n(shortdate)}
        </td>
    </tr>
    {* End of loop. *}
    {/section}
</table>
I hope this was what you were looking for. | 
                                                                                                    
                                                        | Siniša Šehović
                                                                                                                             | Wednesday 07 December 2005 2:02:19 am 
                                                                 Hi Hans-Henry, Thanks for that, but question was for filtering fetched objects from selected section. How to display only published articles from specified section? 
Best regards,S.
 ---If at first you don't succeed, look in the trash for the instructions.
 | 
                                                                                                    
                                                        | Kristof Coomans
                                                                                                                             | Thursday 15 December 2005 3:41:47 am 
                                                                         
{let sectionID=1 
    year=2005
    firstSecond=maketime(0,0,0,1,1,$year)
    lastSecond=maketime(23,59,59,13,0,$year)
    children=fetch( content,
    list,
    hash( parent_node_id, $node.node_id,
       sort_by, $node.sort_array,
       class_filter_type, include,
       class_filter_array, array( 'article' ),
       attribute_filter, array( 'and', 
                                      array( 'published', between, array( $firstSecond, $lastSecond ) ),
                                      array( 'section','=',$sectionID )
                                     )
       )
    )
}independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
                                                                 |