Share » Forums » Developer » Sorting and Selectively Displaying...

Sorting and Selectively Displaying Custom Objects By Date/String Attribute

Sorting and Selectively Displaying Custom Objects By Date/String Attribute

Thursday 25 September 2003 5:08:52 am - 2 replies

Author Message

Paul Wilson

Thursday 25 September 2003 11:56:04 pm

Problem Solved.

For anyone interested and keen enough to read some or all of the above, the code/method I used was as follows...

{let year=currentdate()|datetime(custom,"%Y")}
{let month=currentdate()|datetime(custom,"%m")}
{let day=currentdate()|datetime(custom,"%d")}

{* class 17 is my "events" class *}
{section loop=fetch(content,list,hash(parent_node_id,$node.node_id, class_filter_type, "include", class_filter_array, array(17),sort_by,array(array(name))))}

{let eventyear=$:item.data_map.event_final_date_std.content.year}
{let eventmonth=$:item.data_map.event_final_date_std.content.month}
{let eventday=$:item.data_map.event_final_date_std.content.day}

{* Remove Past Events From Display *}
{section show=or($eventyear|gt($year), and($eventyear|eq($year),$eventmonth|gt($month)), and($eventyear|eq($year),$eventmonth|eq($month),$eventday|ge($day)))}

>>> Code to display current event goes here <<<

{ /section }
{/let}
{/let}
{/let}
{/section}
{/let}
{/let}
{/let}

Regards

- Paul

Mubdi Rahman

Wednesday 01 September 2004 6:44:52 pm

Beautiful, absolutely beautiful! Thanks so much Paul!

-Mubdi

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu