Book Image

Migrating to Drupal 7

By : Trevor James
Book Image

Migrating to Drupal 7

By: Trevor James

Overview of this book

<p>This book will show you how to migrate your content into the Drupal content management system. You&rsquo;ll start by building a content type in Drupal to hold your migrated content. You&rsquo;ll then import your content into Drupal using the Feeds module. In order to be able to easily use them again and again, you will also learn the best methods of maintaining and packaging migration configurations.<br /><br />In "Migrating to Drupal 7" you&rsquo;ll learn how to quickly package your legacy site&rsquo;s data into a format that&rsquo;s easy to import into Drupal. You&rsquo;ll then build a content type to hold migrated data in Drupal. To save time and hassle you will learn how to import content into Drupal using the Feeds module. You&rsquo;ll then get a brief introduction to the Migrate module and its powerful features.<br /><br />With this guide you&rsquo;ll also learn how to upgrade your Drupal 6 website to Drupal 7 in short, simple steps. You&rsquo;ll also learn how to package your configuration code in Drupal using the powerful Features module.<br /><br />In "Migrating to Drupal 7" you&rsquo;ll start by collecting your current site&rsquo;s content and packaging it up into a CSV file so you can easily import it into Drupal. You&rsquo;ll then build a content type to hold your migrated data and content. <br /><br />Mastering migrations using the Feeds module will be the next invaluable tutorial before you get a closer look at the Migrate module&rsquo;s powerful features. You&rsquo;ll then upgrade your Drupal 6 site to Drupal 7 and use helper modules to help run the upgrade faster and with less hassle. This book will then take you through the process of migrating CCK-based Drupal 6 fields to Drupal 7 using the Content Migrate module. <br /><br />Using the Features module you will then package up our Feeds importer and content types into code to help you to build an easily maintainable and flexible Drupal website with.</p>
Table of Contents (16 chapters)
Migrating to Drupal 7
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
5
Maintaining a Migration Path
8
Migrating Content from Earlier Drupal Versions
Index

Installing the Feeds Tamper module


The Feeds Tamper module is a module that enhances the Feeds module by allowing you to add tamper plugins to your importer that you create in Feeds. Adding a tamper will allow you to treat and pre-process your imported data before it actually populates the Drupal database and your nodes. Tamper can be used to do things including but not limited to the following:

  • Add a required field filter to your import process

  • Decode and encode HTML entities

  • Strip HTML tags from the import

  • Explode and implode lists of data

  • Format numbers

  • Convert case

  • Convert boolean values

  • Find and replace data upon import

  • Trim and truncate data

This module will be helpful to use when we want to import multiple values into a Node Reference or Term Reference field in our content type. We can add a pipe in place of a comma for instance across our entire imported data.

To install the Feeds Tamper module follow these steps:

  1. Download the latest version of Feeds Tamper from http://drupal.org/project/feeds_tamper. The latest version is 7.x-1.0-beta3.

  2. Install it as you would any Drupal contributed module.

  3. Once installed, enable the Feeds Tamper and Feeds Tamper Admin UI modules on your module's admin screen in the Feeds fieldset section.

  4. Once enabled, you can access the Feeds Tamper configuration by first returning to your Feeds importers screen and then clicking on the Override link next to an importer.

  5. Once the actual importer configuration screen loads, click on the Mapping link at the bottom of the navigation block in the left sidebar.

  6. When the mapping screen loads, click on the Configure Feeds Tamper link:

  7. This will launch the Tamper plugins screen, which will look similar to the following:

  8. From this screen you can add your tamper plugins. We'll be doing this in Chapter 4, Feeds Tampers.

We now have all of our Feeds modules installed and enabled and we're ready to start building our content type to hold our imported data. Once we have our content type built, we can return to the Feeds module and use it to build our importer for our migration process.