Views

Once you have started to create content, it won't be very long before you find yourself in a situation where you need to create lists of it, as follows:

  • A list of article titles with each title linked to the article detail
  • A list of article "teasers" (shortened versions) linked to the full detail
  • A list of articles associated with a particular taxonomy term

The core module Views is a powerful module that enables you to do all this and much more.

Views is a powerful and flexible query-building and content-display tool that can be used to build complex content listing pages to present your content the way you want.

You can specify the number of items to display in a list and publish your view to a specific URL (a page) or as a block to be included on one or more pages.

There are a number of built-in views included in the standard profile, which we will explore later. For example, Drupal enables you to quickly and easily mark content to be "Promoted to the front page" and the following screenshot shows the default Drupal front-page View, which lists all that content:

Views

The Views module has been a staple of the Drupal site builders' toolkit for many years, but Drupal 8 is the first version of Drupal to include Views in the core module set.

In short, Views is a flexible query-building and content-display tool that can be used to build and present complex sets of filtered content. Views is so popular that almost every Drupal site uses it in some form or another. For this reason, the decision was made to move it into the Drupal 8 core.

You will see how to create views in detail later in Chapter 6, Structure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset