18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Installation Profiles<br />

<strong>Drupal</strong> distributions<br />

Distributions provide out-of-the-box functionality without the need to download<br />

and install anything but the distribution itself. Without a distribution, you typically<br />

need to download <strong>Drupal</strong> and additional modules and themes that you need for<br />

the site to operate. Then you need to spend time running through a normal <strong>Drupal</strong><br />

installation process, followed by time spent configuring the site. With a 'distribution',<br />

you download it, run it through the installer, and you have a functioning and a<br />

configured site. Distributions build on installation profiles by providing everything<br />

you need in one place.<br />

Setting up a distribution<br />

Distributions consist of <strong>Drupal</strong> core, additional modules and themes, and<br />

an installation profile to configure the site. While going through creating an<br />

installation profile, we are also going to walk through the steps needed to<br />

create a full-fledged distribution.<br />

Standard and minimal profiles<br />

<strong>Drupal</strong> comes pre-packaged with the standard and minimal installation profiles. The<br />

standard installation profile installs a common set of core modules. This is similar<br />

to the installation profile packaged with <strong>Drupal</strong> 6. The minimal installation profile<br />

installs only the required modules along with the block and dblog modules.<br />

Creating a profile directory<br />

Profiles are located in the /profiles directory, off the base of the <strong>Drupal</strong> site. To<br />

create a new profile, create a directory alongside the standard and minimal profiles<br />

provided by core. The name should be the machine-readable name of the install<br />

profile you are creating. Throughout this chapter we will build an installation<br />

profile with the name store.<br />

<strong>Module</strong>s, themes, and profiles cannot share the same<br />

machine-readable name. This name should be a unique<br />

namespace for the <strong>Drupal</strong> installation.<br />

[ 344 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!