You are previewing Drupal 7 Cookbook.
O'Reilly logo
Drupal 7 Cookbook

Book Description

This book digs deep into the fantastic capabilities of Drupal – many of which you may not know about – and presents them as 70 practical recipes for you to start playing with and employing right away.

  • Install, set up, and manage a Drupal site and discover how to get the most out of creating and displaying content

  • Become familiar with creating new content types and use them to create and publish content using Views, Blocks, and Panels

  • Learn how to work with images, documents, and video and how to integrate them with Facebook, Twitter, and Add this

  • In Detail

    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.

    ""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.

    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.

    Table of Contents

    1. Drupal 7 Cookbook
      1. Drupal 7 Cookbook
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      7. 1. Installing and Configuring Drupal
        1. Introduction
        2. Installing Drupal
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Uploading through a control panel
            2. Auto-installers
            3. Database table prefixes
            4. Installing on a Windows environment
            5. Alternative languages
            6. Verifying the requirements page
          5. See also
        3. Installing Drupal distributions
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Installing modules and themes
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Manually installing a module
            2. Installing a module with the Drush command-line tool
          4. See also
        5. Setting up site search
          1. How to do it...
          2. How it works...
        6. Creating a multi-site Drupal installation
          1. Getting ready
          2. How to do it...
          3. How it works...
      8. 2. Creating and Publishing Content
        1. Introduction
        2. Creating a basic page and adding it to the main menu
          1. How to do it...
          2. How it works
          3. See also
        3. Installing and configuring a WYSIWYG editor
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Alternative WYSIWYG editors
            2. Using the WYSIWYG for other text formats
            3. Further settings for the WYSIWYG
          5. See also
        4. Editing existing content and adding an image
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Image properties
            2. Image size
            3. Alternative ways to add images to content
        5. Adjusting the tabbed settings for content nodes
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Pathauto
            2. Granularity
          4. See also
        6. Configuring comments
          1. Getting ready
          2. How to do it
          3. How it works...
          4. There's more...
            1. Comment permissions
            2. Sending notifications when a comment is received
            3. Expanding the comment fields
          5. See also
        7. Publishing an RSS feed of basic pages
          1. Getting ready
          2. How to do it...
          3. How it works...
      9. 3. Working with Blocks
        1. Introduction
        2. Adding a new block
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. More block types
            2. Image blocks
            3. Viewing the regions of a theme
          5. See also
        3. Creating a submenu block
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Fixed starting item
            2. Maximum depth
          5. See also
        4. Creating a Superfish menu block
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Replacing the main navigation with the Superfish block
          5. See also
        5. Creating a block with Views
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Adding a new block region to a theme
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Adding a Superfish menu block
          5. See also
        7. Creating a mega-footer menu
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more
            1. Adding more blocks to one region
            2. Adding more regions
            3. Adding other items
          5. See also
        8. Conditional display of a block
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Visibility by content type
            2. Visibility by URL
            3. Setting block visibility with other modules
      10. 4. Custom Content Types
        1. Introduction
        2. Creating a basic content type
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Making a Menu view
          4. See also
        3. Configuring the output of a content type
          1. How to do it...
          2. How it works...
          3. See also
        4. Applying an image format
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Applying other effects
            2. Manual cropping
          4. See also
        5. Installing more field types
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Field collection
          5. See also
        6. Creating a more advanced content type
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Building a custom content importer
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Building a forum
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Forum access
            2. Extending the forum content type
          5. See also
      11. 5. Using Views to Create Custom Lists, Grids, and Tables
        1. Introduction
        2. Creating a news listing view
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Adding views using Panels
            2. Alternative listings layouts
          5. See also
        3. Creating a dynamic view
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Passing arguments to a view from a Panel
        4. Creating a latest news block
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Creating a news image grid view
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Creating a randomly selected list of images
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Creating an archived content block and view
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Building complex views using relationships
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Creating relationships using the reference modules
        9. Adding a text search filter to a view
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Using attachments to extend Views' output
          1. Getting ready
          2. How to do it...
          3. How it works...
      12. 6. Creating Flexible Pages Using Panels
        1. Introduction
          1. Getting ready
        2. Adding custom text to a page
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Adding an existing node to a page
        3. Adding a block to a page
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Adding a dynamic view to a page
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Configuring the visibility of the page
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Other access criteria
        6. Creating a custom page layout using the Layout builder
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Saving a custom layout for reuse
      13. 7. Working with Media
        1. Introduction
        2. Creating a simple slideshow carousel
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Creating a document content type
          1. How to do it...
          2. How it works...
          3. See also
        4. Creating a simple document library
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Document categorization
        5. Linking documents to a content type
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Adding video to a content type
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Embedding videos from other sources
            2. Embedding video directly in a WYSIWYG
      14. 8. Integrating Web APIs
        1. Introduction
        2. Integrating with Facebook
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Displaying a live Twitter feed
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Displaying a Twitter feed using the Aggregator module
            2. Third-party Twitter modules
        4. Adding simple PayPal integration to content types
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Expanding on the Paypal button code method
            2. Creating a full e-commerce online shop
          5. See also
        5. Setting up the Add this social bookmarking service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Contributed modules
            2. Template integration
        6. Adding a Google Map to content
          1. Getting ready
          2. How to do it...
          3. How it works...
      15. 9. Creating Regular, Mobile, and Tablet Themes
        1. Introduction
        2. Creating a new theme using Zen
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Theme inheritance
            2. Theme override functions
          5. See also
        3. Overriding HTML output of a content type
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Creating a "bare-bones" theme from scratch
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Adding a favicon
            2. Adding a theme screenshot
          5. See also
        5. Using the Mobile tools module
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Using a different sub-domain or directory for the mobile site
            2. Using a device specific theme
        6. Installing an off-the-shelf mobile and tablet theme
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Theme display breakpoints
            2. Support for SASS
            3. Support for Google fonts
            4. Other adaptive themes
          5. See also
        7. Configuring theme compression and caching
          1. How to do it...
          2. How it works...
          3. There's more...
            1. The Varnish HTTP accelerator
            2. The Boost module
      16. 10. Working with Other Languages
        1. Introduction
        2. Installing another language using Locale
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Adding a custom language
            2. Other language detection methods
        3. Managing interface translation using Locale
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Enabling content type translation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Displaying a language switching block for end users
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Language icons
            2. Language switcher drop-down
        6. Creating a multilingual View
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Other features of the Internationalization set of modules
          5. See also
      17. 11. Managing Users
        1. Introduction
        2. Creating new user accounts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Automatically creating user accounts
            2. Creating user accounts from CSV
        3. Managing user roles
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Setting up a new user notification
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Building a notification system with the Rules module
          5. See also
        5. Adding a biography field to the user profile
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Adding other fields
            2. Using Views to build a biographies page
            3. Profile 2
        6. Building a grid view of profile pictures
          1. Getting ready
          2. How to do it...
          3. How it works...
      18. 12. Running Drupal
        1. Introduction
        2. System maintenance
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Setting up a backup system
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Restoring from a backup file
            2. Creating manual backups
            3. Using alternative backup destinations
          5. See also
        4. Search Engine Optimization (SEO) with Drupal
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Securing a Drupal installation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Drupal.org–Securing your site
        6. Configuring Drupal caching
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. The Varnish HTTP accelerator
          5. See also
        7. Running commands with the Drush tool
          1. Getting ready
          2. How to do it...
            1. Setting up Drush
            2. Checking the status of a site
              1. Installing modules
              2. Enabling modules
                1. Disabling modules
                  1. Clearing the Drupal cache
                2. How it works...
                3. There's more...
                  1. Drush make
                  2. Installing Drush using PEAR
                4. See also