Hi !
I've searched during some days, but I didn't find the solution to my problem : when a BlogEntry (= a blog post) has more than 1 HTML tag, or if it has 1 HTML tag but it is different from <p>, the content of this BlogEntry isn't displayed into the RSS Feed (mysite/blog/rss).
I've never seen this problem among the subjects that I looked , and I have yet to figure out where this problem.
Here is my code :
BlogHolder.php, class BlogHolder_Controller extends BlogTree_Controller
function init() {
RSSFeed::linkToFeed($this->Link() . "rss", _t('BlogHolder.RSSFEED',"RSS feed of these blogs"));
parent::init();
Requirements::themedCSS("bbcodehelp");
}
function rss() {
// Check if any blog article page exists
$children = DataObject::get_one("BlogHolder");
// If there is blog article pages get 10 latest, with status published sorted in reverse order
if($children) {
// Get children pages
$children = DataObject::get("BlogEntry", "Status = 'Published'", "Sort DESC", "", 10);
// Create RSS feeds
$rss = new RSSFeed($children, $this->Link(), "RSS", "", "Title", "Content");
// Add link in header using XML content type
$this->response->addHeader('Content-type','application/xml');
// Output RSS feeds to browser
$rss->outputToBrowser();
}
}
If you know how to fix this problem, or any idea, I'm interested !