O'Reilly logo

Drupal 8 Development Beginner's Guide - Second Edition by Kurt Madel, Malabya Tewari, Rakesh James, Krishna Kanth, Edward Crompton, Samuel Keen, Tassos Koutlas, Neeraj Kumar

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

Time for action – enhancing the liking system using comments and views

We will now set up a like/dislike button so that visitors to our d8dev site will be able to like/dislike the recipes. Also, we will show how many people have liked each recipe content:

  1. Firstly, we will add the Do you like it ? button in the Recipe Review comment type so that visitors to our d8dev site will be able to like/dislike the recipes. Open up the d8dev site in your favorite browser, and click on the Structure link in the Admin toolbar. Then click on the Comment types link, and finally click on the Manage fields link for your Recipe review in the Operations dropdown.
  2. Click on the Add field link to add a new field. On the next screen, select List (integer) as Add a new ...

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