Book Image

Drupal 7 Cookbook

By : Dylan Spencer James
Book Image

Drupal 7 Cookbook

By: Dylan Spencer James

Overview of this book

<p>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.<br /><br />"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.<br /><br />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.</p>
Table of Contents (18 chapters)
Drupal 7 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Installing modules and themes


It is entirely possible to run a very successful Drupal website out of the box without adding any third-party modules. However, this approach is limited, and your needs may grow out of the built-in core functionalities. With just a few additional modules, the functionality of your site can be significantly expanded.

In this recipe, we will first see how to install the Link module from the Drupal.org website, followed by how to activate and configure it. The Link module adds a Link field to the list of available fields that can be used to create new content types.

How to do it...

  1. 1. Go to http://drupal.org/project/link.

  2. 2. Examine the available releases of Link, and find the most recent Drupal 7 release; copy the URL for the tar.gz file.

  3. 3. In Drupal, select Modules from the admin menu, followed by Install new module.

  4. 4. Paste the URL into the Install from a URL field and click on Install.

  5. 5. After the module is installed, select Enable newly added modules.

  6. 6. Look through the list of installed modules for the FIELDS fieldset. Select the checkbox for Link.

  7. 7. Click on Save configuration to finish:

How it works...

We begin by going to the project page for the module we are installing. In this case, the Link module. We then look for the most recent recommended release of the module.

Note

On the module's page it is likely that there will be two releases for both the Drupal 6 and Drupal 7 versions of the module. The files with the green background are the recommended releases. Be sure to use this version wherever possible. Sometimes there will only be an alpha or development release; try to get the highest version number.

After copying the link to the module's file, we go to the module installation page, and paste the URL to the module's file, and click on Install. Drupal then copies the file to the server, and extracts it into its own directory in the modules folder of the site.

After the module has been copied, we go back to the modules list, and enable the newly installed module by checking its checkbox and clicking on Save configuration to finish.

There's more...

There are more ways to install modules in Drupal. It's up to you to decide which method you prefer, but some other methods are described in the following sections.

Manually installing a module

The preceding method described uses the install from URL method. You may want to install a module manually. In which case simply download and extract the module package and move the extracted files to the Drupal root/sites/all/modules directory.

Installing a module with the Drush command-line tool

The process of installing modules can be made even easier by using the Drush tool to issue installation commands.

See also

  • Running commands with the Drush tool recipe in Chapter 12, Running Drupal