Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying comments form layout #84

Closed
desmond86 opened this issue Jul 7, 2014 · 2 comments
Closed

Modifying comments form layout #84

desmond86 opened this issue Jul 7, 2014 · 2 comments

Comments

@desmond86
Copy link

I want to modify the layout of the comments form and after checking the templates folder, I did not find any file that has the comments form layout. Would it be possible to modify the layout?

Thanks

@gordonbanderson
Copy link
Contributor

There is an extension point in CommentingController.php, method CommentsForm, that can be used to alter the form:

        $this->extend('alterCommentForm', $form);

If you create an extension with the alterCommentForm method and apply this to the CommentingController you will be able to manipulate the following:

  • Which fields appear
  • Their order
  • Add new fields optionally
  • Add CSS classes to fields which can then be used to affect the layout

@dhensby
Copy link
Contributor

dhensby commented Dec 30, 2014

Yes, using the hook and setting a template to use against the form object would work.

However, the issue tracker is for bugs and this kind of support request should be posted to the forums

@dhensby dhensby closed this as completed Dec 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants