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 20 ■ Building a Company Site<br />

Figure 20-11. The Client portfolio view display<br />

The second view display will be a Block, listing a single client profile content item, displaying the full<br />

content, randomly selected from all of the client profiles. Click the Add button in the Displays area, select<br />

Block, and make the following changes to the display:<br />

1. Change the “Display name” field from Block to Featured.<br />

2. Change the Title field to “Featured Client Project,” and add a Title to the page<br />

display using Client Portfolio (see Chapter 9 for details on how to change the title).<br />

3. Change the value for Show in the Format section so that it shows the Default<br />

display instead of the Teaser.<br />

4. Change the Sort Criteria settings, removing the sort by Post date adding a<br />

Random sort.<br />

5. Change the Pager setting to display a single item.<br />

6. Save the view.<br />

The end result of making those changes is that there is now a Block display for the featured client profile<br />

that we can then add to the Sidebar Second region through the “Block layout” page (see Chapter 8). On the<br />

“Block layout” page, select the Client Profile: Featured block from the “Place blocks” box and set the Region<br />

to “Sidebar second.” Also set the block to display only on the Client Portfolio page. After making those<br />

changes, the new Client Portfolio page looks awesome (see Figure 20-12).<br />

222

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

Saved successfully!

Ooh no, something went wrong!