rss displayer set to display ASCENDING

Permalink
Hi,
I'm using the block 'rss displayer' to display a feed with upcoming events. So I want to show the first coming event on top.
RSS displayer block is showing any feed DESCENDING. Can't find a way to change this.

Any ideas anybody?

This is my feed-URL:
http://vp.studiomvdtp.nl/index.php/tools/blocks/pro_event_list/rss....

Thanx in advance!

zeker
 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
Create a custom template for the rss displayer by creating a new directory on your server:
YOURSITE/blocks/rss_displayer/templates/

and then copy this file into that new directory:
YOURSITE/concrete/blocks/rss_displayer/view.php


Rename the new copy to "sort_ascending.php".

Now edit that new copy and find this line:
foreach($posts as $itemNumber=>$item) {

and above that line, paste in this code:
$posts = array_reverse($posts);


Finally, in your browser, go to the page that has this block on it, click "Edit Page", click on the block and choose "Custom Template" from the popup menu, then choose "Sort Ascending" from the dropdown list. Click "Update", then "Exit Edit Mode", and "Publish Changes".

That should do it!

Note that it's only flipping the order of the items that it was giving you in the first place, meaning that if the RSS feed is only showing you newer items, it's only going to display those newer items in ASCENDING order -- it is not going to actually retrieve the oldest items from the RSS feed or anything like that.
zeker replied on at Permalink Reply
zeker
Perfect! Does exactly what I need it to do.
Thanx Jordanlev.