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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 9 ■ Views<br />

• Page Settings: Views provides the ability to create a list of content and have that<br />

list available as a stand-alone page on your site accessible through a URL. For<br />

demonstration purposes, check the “Create a page” box. You must then enter a page<br />

title (or keep the default value) and enter a URL path to reach the list (or keep the<br />

default value). In the Display format, leave it as an unformatted list of teasers, and<br />

set the Items to display at 10 with “Use a pager” checked. This will render a list of<br />

articles; if there are more than 10 articles in the list, a pager will appear at the bottom<br />

of the list to enable the visitor to view all of the articles, 10 articles at a time.<br />

• Block Settings: We covered blocks in Chapter 8, but for demonstration purposes,<br />

we will allow our view to create a block (a page-level element that can be placed<br />

anywhere on a page) that lists the latest three events. Check the “Create a block”<br />

box and enter a block title (or keep the default), leave the display format as an<br />

unformatted list of titles (linked), and set the items per block to 3. Leave the “Use a<br />

pager” check box unchecked.<br />

Figure 9-2. Creating a new View<br />

Click the “Save and edit” button to proceed. The next step in the process is to configure your view, as<br />

shown in Figure 9-3.<br />

101

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

Saved successfully!

Ooh no, something went wrong!