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.

Blog Module /

Discuss the Blog Module.

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

Enable comments on Blog Feed on Home Page


Reply


727 Views

Avatar
Optic Blaze

Community Member, 165 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');
   }

   
}