17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1497 Views |
-
Blog module -- RSS widget isn't grabbing articles by date

12 January 2008 at 7:07pm
So my biggest annoyance right now is that adding a new BlogEntry item adds it way down at the bottom of my list, so using the "drag-to-move" feature never gets used by me.
Unfortunately though, it seems the list's sort order is used by the RSS widget, and pulls articles based on the 'Sort' field in the SiteTree table, which seems kinda backwards -- RSS feeds are generally date-based, and it should be grabbing the newest articles based on the date.
Anyone have any idea on how to hack the RSSWidget.php code to pull the data based on the date instead of the 'sort' field?
-
Re: Blog module -- RSS widget isn't grabbing articles by date

12 January 2008 at 7:53pm
After chatting with simon_w in IRC, he figured out the fix:
modify /blog/code/BlogHolder.php
change the rss() function, around line 186, from this:function rss() {
global $project;
$rss = new RSSFeed($this->Children(), $this->Link(), $project . " blog", "", "Title", "ParsedContent");
$rss->outputToBrowser();
}to this:
function rss() {
global $project;
$children = $this->Children();
$children->sort('Date', 'DESC');
$rss = new RSSFeed($children, $this->Link(), $project . " blog", "", "Title", "ParsedContent");
$rss->outputToBrowser();
}Thanks, simon_w !!
| 1497 Views | ||
|
Page:
1
|
Go to Top |

