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

Selecting all content


Normally, you will want to select only published content, because you want users to see only nodes that have been published. However, as an admin, you could very well want to view unpublished content as well. Fortunately, there is a way to account for both requirements using a filter made just for this job.

Getting ready

Ensure that your site has both published and unpublished content.

How to do it...

On the views list page:

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

  2. Click the +Add new view link.

  3. Enter Browse all content as the View name. Check the box for Description and enter Browse all content if admin, all published if not.

  4. In the Create a page section, enter Browse all content as the page title.

  5. In the Display format select boxes, select Unformatted list, teasers, without links, and without comments, respectively.

  6. Check the Create a menu link checkbox, in the Menu select box, select Main menu and leave Browse all content as the link text, then click the Continue...