O'Reilly logo

Drupal 8: Enterprise Web Development by Chaz Chumley, Matt Glaman, Richard Jones, Nick Abbott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with comments

Drupal 8 introduced comments as a fieldable entity that can now be referenced by any other entity using the new comment field. So what exactly does that mean? This means you no longer manage comments as a configuration option from a content type. The benefit of moving comments into a fieldable entity is that it provides a wide range of flexibility. We can add additional fields if needed along with additional display modes to output comments.

In the case of our Post content type, we already created a relationship to comments to expedite our theming, but we should take a moment to review how that was done and then move on to printing comments in our Blog detail page.

Introducing Comment types

Comment types can be located by navigating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required