Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Add comments to custom templates

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 2859 Views
  • lusiton
    Avatar
    13 Posts

    Add comments to custom templates Link to this post

    Hi.
    I'm creating a website from scratch www.myfriendsru.com/mysite/site/home and building a custom template for it. I can't figure out the way to add comments to some of the pages. I enabled comments on the back end but I guess I need correct divs and classes. Is there a way to find out more about how to do it. Thank you in advance.

  • Andy
    Avatar
    230 Posts

    Re: Add comments to custom templates Link to this post

    You need to add $PageComments to your template.

  • lusiton
    Avatar
    13 Posts

    Re: Add comments to custom templates Link to this post

    Thank you for replaying to my post earlier. I tried to put it in with the back end option by editing HTML and also I tried to put it in the content section on my template. No luck unfortunately.
    Is ther any other code that I have to insert along with $PageComments ?

    Thank you

  • Andy
    Avatar
    230 Posts

    Re: Add comments to custom templates Link to this post

    No, it just needs to go in your template, and you need to have the allow comments box ticked in the CMS. Make sure you flush your templates (?flush=1).

    2859 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.