Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » PageComments in BlogEntries

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 863 Views
  • tonito
    Avatar
    Community Member
    24 Posts

    PageComments in BlogEntries Link to this post

    I would like to add PageComments to my BlogEntries or BlogSummary, however adding $PageComments in the templates doesn't work (it returns a blank).

    I looked at the BlogEntries function on the BlogTree.php page, and the function seems to return the BlogEntry filtered by date or author, so I feel it should work.

    Is there a simple way to add PageComments to BlogEntries, or Is not not possible to display multiple $PageComments on one page (in my case the BlogHolder)?

    I afraid this is a very nooby question, but help would be appreciated.

  • edenview
    Avatar
    Community Member
    13 Posts

    Re: PageComments in BlogEntries Link to this post

    Unfortunately I don't have a fix either but I too am interested in a way that works on BlogSummary.ss or BlogHolder.ss

    $PageComments definately works on BlogEntry.ss

    It seems that when multiple BlogEntry.ss files are called, $PageComments won't work.

    It is possible to include facebook comments though but to me it's no good because not everyone has facebook.

    I'll be editing the BlogHolder.ss so that people can comment on the new BlogEntry.ss instead and spend more time coding.

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: PageComments in BlogEntries Link to this post

    This is because of an issue around scope. You see the PageComments form is attached to the *controller*. When use iterate over a set of blog entries (like <% control BlogEntities %> your scope is the BlogEntry.php class (model) not the controller. With the new comments module for 3.0 this would make doing this possible but not implemented just yet.

  • edenview
    Avatar
    Community Member
    13 Posts

    Re: PageComments in BlogEntries Link to this post

    Thanks for that Willr. It makes sense now.

    I Look forward to version 3.0.

    I will continue development on my website in the mean time so no pressure for the update then.

    Edenview Photography

    863 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.