Tuesday 27 January 2004 12:03:30 pm
I have a web page which display some events. Here is the code to sort by the date attribute of the events:
{let events=fetch(content,list,hash(parent_node_id,$node.node_id,sort_by,array(array (attribute,true(),156),array(attribute,true(),157))))}
156 corresponds to the id of the class date attribute 157 correspond to the id of the class time attribute
you can use only a datetime attribute if you prefer :
{let events=fetch(content,list,hash(parent_node_id,$node.node_id,sort_by,array(array (attribute,true(),MY_DATETIME_ID))))} where MY_DATETIME_ID is the id of your datetime attribute For removing expired items i don't know yet if you can fetch items with a datetime greater that the current datetime...but you can use a simple "if" statement in the items loop of your template
|