Lydie Soler
|
Thursday 04 August 2005 6:50:20 am
well I would like to change the fetch function in order to say that I exclude the article which belongs to a specific section... I though of something like this... (which of course doesn't work)
fetch( content, list, hash( parent_node_id, $parent_node,
limit, $limit,
class_filter_type, exclude,
class_filter_array,
array( 'article/object/section_id', '=', '6' ) ,
sort_by, array( $sort_by, false() ) )
Any idea of what I need to change??? THanks
|
Lydie Soler
|
Thursday 04 August 2005 8:53:04 am
well I had an idea. I remove the limit from the fetch function. Then I add a condition in order to exclude the element from the section. Then I would like to limit the number of elements I display. Here is my code:
<div class="toolbar-item {$placement}">
{section show=or($show_subtree|count_chars()|eq(0), $requested_uri_string|begins_with( $show_subtree ))}
{cache-block keys=$tool_id}
{default limit=5}
{section show=$sort_by|count|eq( 0 )}{set sort_by='published'}{/section}
{let node_list=cond( $treelist_check|eq( 'yes' ),
fetch( content, tree, hash( parent_node_id, $parent_node,
class_filter_type, exclude,
class_filter_array, array( 'folder' ) ,
sort_by, array( $sort_by, false() ) ) ),
fetch( content, list, hash( parent_node_id, $parent_node,
class_filter_type, exclude,
class_filter_array,
array( 'folder' ) ,
sort_by, array( $sort_by, false() ) ) ) )}
<div class="toollist">
<div class="toollist-design">
<h2>{$title}</h2>
<div class="content-view-children">
{section name=Node loop=$node_list sequence=array(bglight,bgdark)}
{if or(eq($Node:item.object.section_id,6), eq(0,$limit))}
{else}
{node_view_gui view=listitem content_node=$Node:item}
{set limit=$limit|dec}
{/if}
{/section}
</div>
</div>
</div>
{/let}
{/default}
{/cache-block}
{/section}
</div>
So I try to decrease the limit variable but nothing seems to happen.... But the code it self work ....Don't understand at all... Please help me ....
|