Creating a Categories block

The content of each of our posts has been assigned one or more tags to identify what category the post belongs to. This type of identification gives our end users another way to easily navigate content. On our mockup, the right-hand sidebar contains a custom block with an unordered list of categories. We will utilize views to create a block display of taxonomy terms by following these steps.

To get started, we will need to navigate to /admin/structure/views and click on the Add new view button. From the Views admin screen, we will add the following information:

  • VIEW BASIC INFORMATION:
    1. View name: Categories.
    2. Check the Description box.
    3. Description: Post categories.
  • VIEW SETTINGS: Show: Taxonomy terms of type: Tags sorted by ...

Get Drupal 8: Enterprise Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.