18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 9<br />

Views<br />

If you ask anyone who has used <strong>Drupal</strong> for a while what the “killer module” is, the answer will likely be<br />

Views, Panels, or custom content types. In that list, Views is usually mentioned first, and it’s the module<br />

that many users say they can’t live without. What does the Views module do that is so special? Simply<br />

stated, Views provides an easy-to-use interface for selecting and displaying lists of content on your website.<br />

Examples of how you might use Views include<br />

• Displaying the most recent news articles posted to your website, sorted in<br />

descending order by the date of posting.<br />

• Displaying a list of company locations as a table that is sortable by clicking the titles<br />

for the location name, city, state, and country.<br />

• Displaying a photo gallery.<br />

• Displaying a slideshow.<br />

• Displaying a calendar.<br />

• Displaying a list of blog postings that is filterable by subject.<br />

• Creating an RSS feed that lists the most recent content posted on your website.<br />

• Displaying just about any kind of list that you can think of, created from the content<br />

that is stored on your website, as a list, table, or RSS feed.<br />

In Chapter 5, we created the Event content type. Let’s put it to work by creating lists of events that will<br />

be useful to site visitors using the Views module. If you haven’t completed Chapter 5, now would be an<br />

excellent time to return to that chapter and work through the example so that you have the content required<br />

to support the upcoming activities.<br />

The Views Module<br />

Views is a <strong>Drupal</strong> 8 core module and is enabled by default during installation. To verify that Views is installed<br />

and enabled, click the Manage link at the top of the page and the Extend option in the submenu. Using the<br />

Search feature of the Extend page, enter Views in the search box. If the Views module exists you should see<br />

two modules listed as shown in Figure 9-1. If either of the check boxes is unchecked, please check it and<br />

click the “Save configuration” button.<br />

99

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!