Gregory Mann
|
Thursday 14 April 2005 1:55:54 pm
Could anybody help me out here. I'd like to modify the code in the <i>node_list.tpl</i> so that it will order my entries in descending order instead of ascending order. My challenge is to use a right toolbar as a quick view of upcoming events, but when I add an event, it shows up first in the list, instead of last.
Thanks Greg
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
|
Gregory Mann
|
Friday 15 April 2005 7:41:58 am
Thanks Lukasz I know where to find the code, I just don't know how to write the code that I need so that the list will show up in descending order, rather than the default ascending order. Heres the default code;
{* DO NOT EDIT THIS FILE! Use an override template instead. *}
<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,
limit, $limit,
class_filter_type, exclude,
class_filter_array, array( 'folder' ),
sort_by, array( $sort_by, false() ) ) ),
fetch( content, list, hash( parent_node_id, $parent_node,
limit, $limit,
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>gbm
<div class="content-view-children">
{section name=Node loop=$node_list sequence=array(bglight,bgdark)}
{node_view_gui view=listitem content_node=$Node:item}
{/section}
</div>
</div>
</div>
{/let}
{/default}
{/cache-block}
{/section}
</div>
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
|