Drupal 5 Views Recipes

Drupal 5 Views Recipes
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 25%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Display particular types of content in unique and compelling ways on your Drupal web site
  • Enhance your web site with calendars, timelines, galleries, maps, podcasts, Views Fusion, and more
  • Indispensable resources for Drupal 5 Administrators – Drupal Administration Menu, Views Bulk Operations, ModuleInfo, and Editable Fields modules
  • More than 90 recipes – pick the ones that work best for your web site

Book Details

Language : English
Paperback : 412 pages [ 235mm x 191mm ]
Release Date : May 2009
ISBN : 1847196969
ISBN 13 : 9781847196965
Author(s) : Marjorie Roswell
Topics and Technologies : All Books, CMS and eCommerce, Content Management (CMS), Drupal, Open Source


Table of Contents

Chapter 1: Introduction to Views
Chapter 2: Working with Default Views
Chapter 3: CCK and Views
Chapter 4: Dates and Calendars
Chapter 5: Views and Tools for Administrators
Chapter 6: Views Galore
Chapter 7: Theming and Layout
Chapter 8: Navigating the Online Drupal Community
Appendix A: Default Views in Drupal 5 Modules
Appendix B: Formatters
Appendix C: Style Plugins
Appendix D: Views Hooks for Coders
Appendix E: Modules Included in Recipe Ingredients
Appendix F: Additional Resources and Modules Mentioned in Recipes
Appendix G: Selected Noteworthy Patches to Views
  • Chapter 1: Introduction to Views
    • Recipe 1: Installing the Views module
      • Finding or creating the <DRUPALROOT>/sites/all/modules directory
      • Downloading and uncompressing the module
      • Enabling the module
      • Recipe notes
  • Recipe 2: Views-related URLs on your site
    • Recipe notes
  • Recipe 3: Creating a "Swim Groups" Page View
    • Creating a new Content type (Swim Group), and adding content
    • Creating a View
    • Selecting Filters
    • Recipe notes
  • Recipe 4: Adding a Header to your View
    • Recipe notes
  • Recipe 5: Adding a View to a Menu
    • Recipe notes
  • Recipe 6: Creating a Block of Swim Groups
    • Recipe notes
  • Recipe 7: Creating an "Admin" Role and setting Access Permissions
    • Installing the Admin Role module
    • Adding an Admin Role
    • Configuring the Admin Role module
    • Creating a User for the Admin Role
    • Recipe notes
  • Recipe 8: Installing Firefox and Firebug
    • Installing Firefox
    • Installing Firebug
    • Recipe notes
  • Recipe 9: Revealing the full extent of Views
    • Ensure that Firefox and Firebug are installed (See Recipe 8)
    • Running the jQuery command
    • Recipe notes
  • Recipe 10: Preparing Views Worksheets
    • Recipe notes
  • Summary
  • Recipe 12: The frontpage View
    • Enabling the Views RSS module
    • Looking at the Frontpage View, and Overriding it
    • Basic Information fieldset
    • Page fieldset
    • Fields fieldset
    • Feed Selector Argument
    • Filters fieldset
    • Sort Criteria fieldset
    • Enabling the frontpage View to show on the front page
    • Removing duplicate search engine results
    • Recipe notes
  • Recipe 13: Read More link
    • Recipe notes
  • Recipe 14: All-time Popular, and Recent Popular Pages
    • Enabling Statistics
    • Overriding the Default Views
    • The Menu Options
    • Recipe notes
  • Recipe 15: All-time Popular, and Recent popular Blocks—removing the hit count
    • Adding the blocks to a region
    • Removing the hits from the popular_alltime block
    • Recipe notes
    • Another alternative
    • User-submitted snippets
  • Recipe 16: Taxonomy View
    • Recipe notes
  • Recipe 17: Fixing the case of the missing Taxonomy term
    • Recipe notes
  • Recipe 18: Empty Text, with PHP
    • Generating a list of Regional categories
    • Recipe notes
  • Recipe 19: Getting to know the Tracker
    • Recipe notes
  • Recipe 20: Making the Tracker Sortable
    • Recipe notes
  • Recipe 21: Integrating the Tracker View with the Tracker module
    • Recipe notes
  • Recipe 22: Reviewing Default Views code
    • Recipe notes
  • Recipe 23: Creating a Default View
    • The ".info" file
    • Default Views function in a ".inc" file
    • Including the Default View in a ".module" file.
    • Recipe notes
  • Summary
  • Chapter 3: CCK and Views
    • Recipe 24: Addressing the Views Body Field issue
      • Demonstrating the Body Field issue
      • Copying the Body Field, and modifying the View
      • Recipe notes
  • Recipe 25: Creating Website snapshots
    • Installing modules
    • Creating a Content Type
    • Adding the Link Field
    • Create a Website Snapshots View
    • Recipe notes
  • Recipe 26: Creating a Blogroll
    • Modifying the Link Field
    • Creating a new view based on website_snapshots
    • Recipe notes
  • Recipe 27: Displaying Guitar Chords
    • Recipe notes
  • Recipe 28: Using the Viewfield module
    • Installing modules
    • Views, Taxonomy, and Content setup
    • Associating the View with a Content item
    • Recipe notes
  • Recipe 29: Using the Node Reference module
    • Enabling the modules
    • Creating the Media Hit and Press Release Content types
    • Adding Press Releases
    • Creating drop-down Press Release View
    • Modifying and populating the Media Hit Content type
    • Recipe notes
  • Recipe 30: Relating Content types with Reverse Node Reference
    • Recipe notes
  • Recipe 31:Embedding a View in a Theme template
    • Recipe notes
  • Recipe 32: Displaying mini-pie charts
    • Setting up the Pie Chart Content type and View
    • Install and configure sIFR
    • Recipe notes
  • Summary
  • Recipe 34: Block of upcoming workshops
    • Recipe notes
  • Recipe 35: Exposed Filters
    • Recipe notes
  • Recipe 36: Views Date Range Filter module
    • Recipe notes
  • Recipe 37: Exposed Filter settings
    • Recipe notes
  • Recipe 38: Summary Views
    • Recipe notes
  • Recipe 39: Date Browser
    • Recipe notes
  • Recipe 40: Timeline
    • Recipe notes
  • Recipe 41: Views Popup
    • Recipe notes
  • Recipe 42: Creating a Calendar
    • Installation and configuration
    • View setup
    • Installing Calendar Blocks
    • Recipe notes
  • Recipe 43: iCal feeds
    • Import Calendar items
    • Export Calendar items
    • Recipe notes
  • Recipe 44: Upgrade Date and Calendar modules
    • Backing up the Database
    • Upgrading Calendar and Date
    • Recipe notes
  • Summary
  • Recipe 46: ModuleInfo
    • Recipe notes
  • Recipe 47: Views UI permissions
    • Recipe notes
    • Recipe 48: Views UI Sort
    • Recipe notes
  • Recipe 49: Editablefields
    • Recipe notes
  • Recipe 50: Views Bulk Operations—Content administration
    • Recipe notes
  • Recipe 51: Views Bulk Operations—Taxonomy assignment
    • Recipe notes
  • Recipe 52: Views Custom Field
    • Recipe notes
  • Recipe 53: Cron setup
    • Example 1: Setting up Cron using cPanel
    • Example 2: Setting up Cron on a Linux box
    • Example 3: Using the Poormanscron module
    • Recipe notes
  • Recipe 54: Formatting Views queries
    • Recipe notes
  • Summary
  • Chapter 6: Views Galore
    • Recipe 55: Views Fusion
      • Patch the Node Reference module
      • Views setup
      • Views Fusion installation and configuration
      • Recipe notes
  • Recipe 56: Views Fast Search
    • Setup
    • Using the Default View
    • Using an Alternative Imported View
    • Replacing the Search block
    • Recipe notes
  • Recipe 57: YouTube Video Bar
    • Recipe notes
  • Recipe 58: Views Bonus Pack Export
    • Recipe notes
  • Recipe 59: Photo Gallery
    • Set up the Photo Content type
    • Configure ImageCache
    • Add Photos
    • View setup
    • Recipe notes
  • Recipe 60: Gallery with Lightbox2 and jQuery Update
    • Installing jQuery Update
    • Installing Lightbox2
    • Recipe notes
  • Recipe 61: Google Maps
    • Setup Google Maps Tools
    • Create and populate the Content types
    • View setup
    • Recipe notes
  • Recipe 62: Proximity Search
    • Recipe notes
  • Recipe 63: Views Calculations
  • Recipe 64: Podcasting
    • Setup
    • Adding content
    • View setup
    • Recipe notes
  • Recipe 65: Using the Flag module for Bookmarks
    • Default Bookmarks View
  • Recipe 66: Using the Flag module for various use cases
    • Viewing a List of inappropriate comments
    • Creating a view for Fact-Checkers
    • View of RSVPs
    • Recipe notes
  • Recipe 67: Explore more Views, Galore
    • Views Checkboxes
    • Phoneblogz
    • Default Views
  • Summary
  • Recipe 69: Displaying Themeable function names in Source Code
    • Recipe notes
  • Recipe 70: Using Panels with SimpleFeed
    • Setup
    • Creating Feed Content
    • Create Views
    • Enabling specific Views for Panels
    • Panels setup
    • Placing Panels on the Front Page
    • Recipe notes
  • Recipe 71: Tweaking output with hook_link_alter
    • Recipe notes
  • Recipe 72: Debugging
    • Recipe notes
  • Recipe 73: Node-feed-item.tpl.php
    • Recipe notes
  • Recipe 74: Format the Pager with CSS-only modifications
    • Recipe notes
  • Recipe 75: Overriding the theme_pager function
    • Recipe notes
  • Recipe 76: Understanding how Theme functions are called
    • Recipe notes
  • Recipe 77: Override theme_views_view
    • Recipe notes
  • Recipe 78: Total Item count
    • Recipe notes
  • Recipe 79: Views Theme Wizard
    • Recipe notes
  • Recipe 80: Date badge
    • Recipe notes
  • Recipe 81: Grouped View
    • Recipe notes
  • Recipe 82: Body classes
    • Recipe notes
  • Recipe 83: Carousel View
    • Recipe notes
  • Recipe 84: Views Dashboard—code approach
    • Recipe notes
  • Recipe 85: Views Dashboard—module approach
    • Recipe notes
  • Recipe 86: Great Online Theming resources
  • Summary
  • Recipe 88: Searching the Views issue queue
    • Basic Search
    • Advanced Search
    • Recipe notes
  • Recipe 89: Posting an issue
    • Posting a New issue
    • Responding to an existing issue
    • Recipe notes
  • Recipe 90: Applying a Patch
    • Recipe notes
  • Recipe 91: Creating a Patch
    • Recipe notes
  • Recipe 92: Installing a Search plugin for the Contributions API
    • Recipe notes
  • Recipe 93: Using IRC—real-time technical support
    • Recipe notes
  • Recipe 94: Exploring Resources
  • Summary

Marjorie Roswell

Marjorie Roswell is a web developer from Baltimore, MD. She has been building web sites that serve the community for more than a decade.

Marjorie developed a GIS system for assisting citizen callers to the Baltimore Office of Recycling, and has taught professional classes in desktop publishing, AutoCAD, and Drupal.

While in college, Marjorie received the Betty Flanders Thomson Prize for Excellence in Botany. She now brings together her love of plants and Drupal to create BaltimoreUrbanAg.org, the web site for the Baltimore Urban Agriculture Task Force.

Marjorie enjoys writing and playing music with a community of local musicians. You can hear some of her music at FriendlyCoffeehouse.org.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Drupal 5 Views Recipes +    Heroku Cloud Application Development =
50% Off
the second eBook
Price for both: $43.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Master the Views User Interface
  • Create views arguments
  • Implement and create default views for recent comments, the frontpage, group listings, and more
  • Explore a variety of ways to associate views with related content
  • Display event listings, calendars, and timelines
  • Make site administration easier using several administration modules
  • Enhance your web site with Google Map tools, YouTube video bar, photo gallery, audio, and Views Fast Search
  • Enable your users to flag and bookmark content for later viewing
  • Incorporate views into panels and tabs
  • Create a directory of available theme functions, and learn some key debugging strategies
  • Use theme overrides and CSS to create more attractive views
  • Fix the long-standing taxonomy term bug, and the body field Views display issue
  • Create and apply patches
  • Create some helpful browser buttons and search plug-ins to facilitate finding information online

Here is the brief summary of what each chapter covers:

Chapter 1 – Introduces the Views module, along with a Views Worksheet that will serve as a guide throughout the rest of the book. We create a basic view of Swim Groups.

Chapter 2 – In this chapter, we look at the six "default views" that come with the Views module. We learn which modules must be enabled for these views to appear, and we get to know the feed selector and Term arguments. We close the chapter by creating a module with a default view of Swim Groups.

Chapter 3 – In this chapter, we incorporate CCK fields into views such as a Blog Roll, Guitar Chord Display, and a Block of Media Hits Associated with Press Releases. We share a variety of ways to associate views with related content, including Viewfield and Node Reference modules, and building views from within a template.

Chapter 4 – In this chapter we focus on date fields, calendars, upcoming events, and the timeline module. This chapter rounds out coverage of all of the Views User Interface fieldsets, including Exposed Filters.

Chapter 5 –
In this chapter, we examine ten tools to ease the work of site administrators, including Views Bulk Operations, Editable Fields, ModuleInfo, and setting up cron

Chapter 6 – In the “Views Galore” chapter, we explore some rarely-covered but powerful modules, including: Views Fusion, Views Fast Search, Views Bonus Pack Export, and Google Maps Tools. We also create a YouTube Video Bar, detail the steps to install jQuery Update with a Lightbox2 Gallery, and examine how to use the Flag module for a variety of applications.

Chapter 7 – This is the theming chapter, a bit more code-rich than the others. We create a directory of available theme functions. We look closely at Views theme functions and override them when necessary. We cover some debugging strategies. We use CSS to create "date badges" and to control carousel formatting. Finally, we incorporate views into panels and tabs.

Chapter 8 – In this chapter, we focus on navigating the online Drupal community. We learn how to search the Views issue queue, and how to apply and create patches. We cover some Do's and Don'ts in Drupal chat on IRC, and create a few helpful browser buttons and search plug-ins to facilitate finding information online.

Appendix A – List of all default views available for Drupal 5

Appendix B – Comprehensive list of Drupal 5 field formatters, by module

Appendix C – Comprehensive list of Drupal 5 style plug-ins, by module

Appendix D – Views 1 hooks

Appendix E – Modules included in recipe ingredients

Appendix F – Additional resources and modules

Appendix G – Selected noteworthy patches to views, sorted by topic

In Detail

The Drupal View modules give you flexibility and freedom to customize the display of your web site's content. Although there are more than 100 views-enabled modules, few site administrators use Drupal Views to its full potential.

This book will enable you to realize the fullest potential of this powerful resource by providing a wide variety of powerful recipes for creating and displaying a wide variety of views – essential classics you will use again and again to innovative display methods that will make your Drupal site stand out. Pick and choose the ones you would like to prepare for your web site.

In this book you will find ninety-four recipes to create a wide selection of views. The list includes event listings, interactive calendars and timelines, maps, proximity search, podcasting, carousels, Views Fusion, and many more. You will also explore default views, views with CCK, and master a variety of ways to associate views with related content.

Most people think of Views for site visitors. But Views can also be handy for site administrators. You will get to know the Views Bulk Operations module, along with Editable Fields, and Views Custom Fields. (You’ll probably wonder why you never used them before!)

If you want to take Views to the next level, the book contains a code-rich chapter on theming. However, you will find most of the recipes detailed by the author do not require any original coding at all.

As you progress through the recipes, you will be immersed in such Drupal Views topics as fields, arguments, filters, exposed filters, sorting, style plug-ins, formatters, cloning and copying views.

Because Drupal is a worldwide and ever adapting system, the author also includes great tips and resources for navigating the online Drupal community and expanding your knowledge of the recipes.

Finally, there is an extensive Appendix, which includes listings of all default views, formatters and style plug-ins for Drupal 5, along with a categorized list of patches.


This book will give you a long list of powerful recipes. Choose the ones that suit your needs and use them through step-by-step instructions. Most of the recipes are code-free, but a number of the recipes contain code snippets.

Who this book is for

This book is primarily written for Drupal site builders, administrators, and themers who want to develop custom content displays using Views. It can be used by anyone who has a Drupal 5 web site, including original site developers as well as people who have inherited a Drupal 5 site.

Some knowledge of HTML and CSS is required; PHP basics will be handy for some of the recipes.


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software