Book Image

Drupal 7 Views Cookbook

By : J. Ayen Green
Book Image

Drupal 7 Views Cookbook

By: J. Ayen Green

Overview of this book

<p>Fully revised and updated for 2016, Drupal 7 Views Cookbook allows you to bypass most of the Views' learning curve and quickly take advantage of the capabilities of the Views module to select and present your Drupal content through step-by-step instructions for quickly developing dozens of useful views.</p> <p>Starting with a brief introduction to Views, Drupal 7 Views Cookbook takes you through recipes for elementary views, such as displaying randomly selected content, to intermediate views, such as customizing links, to advanced views providing multiple interacting displaysof content on the same page<a name="_GoBack"></a>. Along the way, there are recipes for theming views, creating a view in your code, creating a custom view handler, administering views, and finally, using some other modules related to the Views module. Most recipes are standalone, so pick them in any order!</p> <p>Don't limit your site with dull presentation of content in last-in-first-out order. Empower your site visitors with the recipes that Drupal 7 Views Cookbook delivers!</p>
Table of Contents (17 chapters)
Drupal 7 Views Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a dynamic links display block


Views are capable of providing displays that appear as blocks in any selectable region of your theme. We're going to create a block that provides a dynamic list of links for a specific content type.

Getting ready

This recipe is based on the view created in the previous recipe.

How to do it...

On the Views list page:

  1. Navigate to the views list (admin/structure/views).

  2. Click the Edit link for the Sponsors view.

On the view edit page:

  1. Click the + Add button next to the Block display button at the top of the page, and choose Block from the dropdown list.

  2. Click the None link beside Block name in the Block Settings section and enter Sponsor links, then click Apply.

  3. Click the Block link in the next to Display name, enter Sponsor links for the name, and click Apply.

  4. Click Our sponsors in the Title section, select This block (override) from the For select box, change the title to Sponsor links, and click Apply (this display).

  5. Click the Content link next to Show in the Format...