Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Enable comments on Blog Feed on Home Page


Go to End


1962 Views

Avatar
Optic Blaze

Community Member, 190 Posts

18 June 2013 at 1:07am

Hi there,

I have a SS2.4.10 site that uses the blog module. It works well and i have created a feed on the home page of the site that pulls through the latest blog articles.

I want to allow users to make comments on the home page that will automatically update the blog's comment section. My articles stay on the homepage for about a week until they are replaced with a new one. For that week i want visitors to the home page to comment on the article, but the comments must not be added to the home page...but rather the blog page.

Currently the homepages code looks like this:
------------------------------------------------------------------------------

class HomePage_Controller extends Page_Controller {

public static $allowed_actions = array (
);

function LatestArticle() {
return DataObject::get('BlogEntry','','Date DESC','','1');
}

}