Book Image

Drupal 7 Cookbook

By : Dylan Spencer James
Book Image

Drupal 7 Cookbook

By: Dylan Spencer James

Overview of this book

<p>Drupal 7 is a modern Content Management System famed for its flexibility and power. Using Drupal you can easily create custom functionality that would otherwise have to be purchased in many of the other leading CMSs.<br /><br />"Drupal 7 Cookbook" is filled with recipes to help you to do more with Drupal and improve your skills. Chapters range from content creation, to theming, to managing your site. You will learn how to create your own content types and use them to create Views, Blocks, and Pages. This book will take you from novice to pro in just 12 chapters.<br /><br />In a wide variety of practical recipes, you will learn how to work with views and panels, how to provide translations for your content to create a multilingual site, and to integrate your site with social media. You can develop the Zen starter theme or learn how to create custom cross-browser compatible Drupal themes, including themes for mobile devices. The Drupal 7 Cookbook contains all of the means necessary to take your skills from those of a novice Drupal user to a proficient site builder.</p>
Table of Contents (18 chapters)
Drupal 7 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Adding a dynamic view to a page


One of the important features that makes the Panels module so flexible is that it allows us to add views to a page's regions. In this recipe, we will not only be adding a preexisting view to a page, but we will be supplying an argument to the view, via the panel, to filter it.

In this recipe, we will be making use of the Glossary view, which is one of the sample views shipped with the Views module. The Glossary view accepts an alphanumeric argument to filter the view to display glossary terms for the supplied letter, which is why it's termed a dynamic view.

This recipe illustrates the way in which a dynamic view can have its argument supplied through the Panel, meaning that a view can be recycled on different pages, just by having different arguments supplied to it.

The outcome of this recipe is a page displaying a glossary listing filtered by the letter "a", as follows:

Getting ready

For this recipe, please ensure you have installed the Panels and Views modules...