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 ■ Views<br />

Figure 9-4. The All Articles view page<br />

Block Display<br />

With the full listing of Articles page under our belt, let’s now revise the Block display. Return to the Views<br />

administration page by navigating to Manage ➤ Structure ➤ Views. Locate the Recent Articles view and click<br />

the Edit link in the Operations column. You should now see the Recent Articles view configuration page<br />

(see Figure 9-3).<br />

The first step in the process is to click the Block button in the View display list. You should be able<br />

to find it directly to the right of the All Articles Page button. Clicking the Block button displays all of the<br />

configuration parameters for the block. Let’s update the display to only show the three most recent Article<br />

titles, sorted in date-published order, descending so that the most recent Article appears at the top of the<br />

page. Let’s start the process by updating the name of our display from Block to something more descriptive,<br />

followed by making the changes we need to make to the display itself:<br />

1. In the first column, next to “Display name,” click Block and change the value of<br />

the “Administrative name” field to “Recent Articles Block.”<br />

2. Leave the Title as Recent Articles, as it still applies to what we are going<br />

to display.<br />

3. Leave the Format as “Unformatted list,” as we still want the articles to appear<br />

as a list.<br />

4. Change the value of the Show option to Fields, as we only want to display the title<br />

of the Articles in our list.<br />

5. In the Fields section, leave the item to be displayed as the title. If it doesn’t say<br />

Title, click the Add button for that section and search for Title, adding it to<br />

the display.<br />

107

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

Saved successfully!

Ooh no, something went wrong!