Book Image

Drupal 6 Attachment Views

By : J. Ayen Green
Book Image

Drupal 6 Attachment Views

By: J. Ayen Green

Overview of this book

<p>The Drupal View modules give you the flexibility and freedom to customize the display of your web site's content. Defining custom content types is easy; however, it's also possible to use various content types in a complementary manner on the same page! Attachment displays in Views (also known as Attachment Views), are a way to customize your web site with multiple displays that interact with each other and turn a nice site into a spectacular one.<br /><br />This hands-on tutorial will teach Drupal developers across the experience spectrum how to use Attachment displays in Views, to make quick progress in functionality and added-value to users! Views are a common way to display a collection of similar content types on one page. What do you do if you want to display different content types simultaneously? What if you want to allow a user to interactively select which content they want, without using a menu? You can actually have more than one display within a view and views within a view.<br /><br />This book starts by introducing Attachment Views as reader activities. Here, we create a single Attachment View and take a closer look at giving each page an interactive feel. It also shows you to create a View with an Attachment View. Later, using practical examples, it helps you to develop a 3-view composite display using two and three custom content types. You will also be able to develop a composite display using multiple Attachment Views, to provide a control panel of sorts from which you can view the various content types. Finally, we will put the home page together making use of Views, blocks, a flash slide show, and other pieces.<br /><br />This book provides several examples of introducing additional displays onto a web page, and having them interact with each other. The result is pages that provide several types of information and behave more like a desktop application, increasing the value to your site visitors.</p>
Table of Contents (17 chapters)
Drupal 6 Attachment Views
Credits
About the Author
About the Reviewers
Preface

Activity 9-3 Adding a Theme region


We're going to be creating a view in the next activity to display a news item on our front page. The location for that view needs to be in a location that is currently not addressable in our theme. What to do, what to do? Simple. We'll create a new region in our theme, and add it to our template.

  1. 1. We need to edit our theme info file. In this case, the theme is Acquia Slate. First, let's look at the handy view the block page gives us of our regions. Focus on the upper ones.

  1. 2. Open acquia_slate.info, and look at the regions entries:

    regions[sidebar_first] = sidebar first
    regions[sidebar_last] = sidebar last
    regions[banner] = banner
    regions[header_top] = header top
    regions[header_first] = header first
    regions[header_middle] = header middle
    regions[preface_sidebar] = front preface sidebar
    regions[content_top] = inner content top
    regions[content] = content
    regions[content_bottom] = content bottom
    regions[postscript_first] = postscript first
    regions[postscript_middle...