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 3-5 Creating the contact-us Attachment view


  1. 1. We need to create the content for the Attachment view. We'll be using a custom content type, Location, for this (the custom content types used in this book are detailed in Appendix B). Let's create the content (node/add/location).

  2. 2. We'll give the content a title, Guild Builders Contact Information.

  3. 3. For the body, we'll create a<div> and put the contact information in it.

Note

This step requires the embed_gmap module. Information about this module can be found in Appendix A and at http://drupal.org/project/embed_gmap.

  1. 4. Next, we'll get to the field that makes this content type different, the map. The embed_gmap module takes the content of the map field and uses it to produce and embed a Google map. Enter the address in this field.

  2. 5. We'll save the content, which is shown in the following screenshot.

  1. 6. With our content created, we're ready to create our Attachment display. Edit our Contact us view (admin/build/views/edit/contact_us...