I have the following functions in my HomePage controller displaying XML to /home/rss:
// ----------------------------------------------------------------------------
// GET LATEST NEWS
// ----------------------------------------------------------------------------
function LatestNews()
{
$news = DataObject::get_one("ArticleHolder");
return ($news) ? DataObject::get("ArticlePage", "", "Date DESC", "", 3) : false;
}
// ----------------------------------------------------------------------------
// RSS NEWS FEED
// ----------------------------------------------------------------------------
function rss()
{
$rss = new RSSFeed(self::LatestNews(), $this->Link(), parent::GetConfig()->SiteName." - Latest News");
$rss->outputToBrowser();
}
Works fine, although it pulls the entire article out in HTML format, image included (which is a separate dataobject on the pagetype rather than one inserted into the content.
Is there a way I can output on the content portion of the object returned from LatestNews?
Aaron