Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Extending Comments

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 256 Views
  • adambuczek
    Avatar
    Community Member
    5 Posts

    Extending Comments Link to this post

    I'd like to extend AddCommentForm so I can output field labels with custom classes. I want to remove 'left' class from label as it conflicts with Foundation but ideally I want to have full control over outputted HTML.

    I tried to extend CommentingController in mysite/code but no luck there...

    Can I set it up so every field type has it's own .ss template?

    How do I do this?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Extending Comments Link to this post

    You can have full control over the form markup by providing a custom CommentsInterface file. By default the form part is just dumped out using the standard form template but that doesn't need to be. See http://doc.silverstripe.org/framework/en/topics/forms#custom-form-templates for an example of the form markup (you can use <% with AddCommentForm %> to jump into the scope of the add view.

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