Download and Install Contributed Modules

To fulfill the functional requirements for the new site, I'll need to download the following contributed modules Views To create lists of resources and events Pathauto To create SEO and user friendly URLs Backup and migrate To automatically backup the site Webform To create online forms Date To enable entering information as date formatted fields I'll follow the instructions outlined in Chapter 8 and install and configure the modules before moving onto the next step. With the contributed...

Adding a Content Item to a Menu

There are two approaches for adding items to menus you can use the menu administration form (see figure 5-4) to create a new menu item, or you can create a menu link from the content item that you wish to reference from within the form used to create or edit that content item. The best practice is to use the content creation form (see figure 5-3) or, as we will see later in the book, other element creation forms such as a panel page or a view. The reason for using this approach is that when you...

Creating Your First Group

At this point you have OG set up and ready to use. I'll create a group to demonstrate how easy the OG group module is to use. To create a group, click on the Create content link and select the Set up an organic group content type. The key fields associated with the Set up an organic group content type includes Group name. Enter the name you wish to associate with the group. For demonstration purposes I'll create a group called Drupal 7 Fans. Description. Enter a brief description about the...

Selecting a Taxonomy Term when Creating Content

Based on our actions in the previous step, creating a new content item using the Basic page content type will now present the author with a list of values that they can select from to categorize the content they are authoring. To test this feature, click on any of the create content links that we have described previously (such as the create content link in the gray bar near the top of the page). From the list of content types listed, click on the Basic page content type. When the Basic page...

Backing Up Your Site

If you don't do anything else on this list of administrative tasks, at least make sure that your data is safe and recoverable in the case of an unexpected disaster. It's easy to put off backing up your site, as it's likely that you'll rarely need to go back and restore your site from a backup. But speaking from experience, the first time you need to restore your site and you don't have a backup is the last time you won't have backups in place from the start. Take it from the voice of experience...

The Organic Groups Module

Another approach for building social networking sites is to use Drupal's Organic Groups (OG) module. This module provides the ability for users on your site to create their own group, where a group consists of a homepage and the ability for other users to join and create content. You can think of OG as the Drupal version of Yahoo or Google Groups. An excellent example of a site built using OG is www.popsugar.com community groups. Setting up Organic Groups is a relatively simple process that...

Creating Your First Poll

Poll Drupal

To create a poll, click the Add content link on your site, which reveals the list of content types that you have enabled on your Drupal installation. On that list, you will now see a content type titled poll see Figure 9-13 . Click on the Poll link, revealing the form that you will use to create the poll. As an example, create a new poll that asks site visitors to vote on whether U.S. college football should adopt a playoff structure like the National Football league. Follow the example in...

Web Forms

Collecting information from site visitors through online forms is another key interactive feature that is easy to enable and use on your new site. Using the Webform contributed module, you can create simple forms such as a form that is used to submit a question or complex questionnaires using the features enabled through the Webform module. To demonstrate how easy it is, I will walk you through the process of creating an online suggestion box where site visitors can enter and submit suggestions...

Setting Up Products

With the general storefront parameters set, I'm ready to set up the products on my site. For my site I am going to sell Drupal 7 coffee mugs and t-shirts. The first step in setting up products is to define the product categories that you intend to use on your site. Ubercart uses Drupal's taxonomy system to categorize products, and automatically creates a vocabulary named Catalog. Following the steps outlined in Chapter 4, I'll add the new terms for coffee cups and t-shirts. When creating the...

How to Download Install and Configure a Module

The first step in installing a module is finding the right module to use. As described earlier, there are thousands of modules to pick from finding the right one is often the biggest challenge. For demonstration purposes, let's pick one of the most popular, powerful, and useful modules the Views module. A new feature of Drupal 7 is an administrator's page, which allows you to download and install a module by simply entering the URL of the install file and clicking a button. Drupal handles the...

Creating a Panel Page

Drupal Create Panels Teaser

When creating a panel page, you need to decide what content is going to go on the page, as well as the layout for the page. You can use Figure 12-2 to figure out whether an off-the-shelf layout exists that meets your needs. If one of the eight basic layouts doesn't work, you can always create a custom layout using the flexible option. For demonstration purposes, we're going to assume that we want to divide the content region into three rows, with the first row having a single column, the second...

Formatting the Output of a Custom Content Type

There will be times when the visual representation of your new content type doesn't fit with how you would like the content created with your new content type to be rendered on the screen. Adjusting the order and positioning of the labels in relation to the field can be accomplished by clicking on the Manage layout link for the desired content type. To access this feature, click on the Structure link at the top of the page and then click on the Content type link on the Structure page. To access...

Assigning a Taxonomy Vocabulary to a Content Type

Providing content authors with the ability to assign one of the terms to a new piece of content requires that a site administrator updates the all of the content types to include a reference to the vocabulary that we wish to link to content on our site. The first step is to identify all the content types that you want to associate with the new vocabulary. You may decide that all content types will use the vocabulary to categories the content created on your site, or you may decide the...

Setting Up Your First Forum

To enable the Forums module, click on the Modules link in the top menu and scroll down the page until you see the Forum module. Check the box associated with the module and click the Save configuration button at the bottom of the page. Drupal will install the Forums module. The next step in the process is to set permissions for forums. Here are the permissions that you can Create new forum topic content Edit own forum topic content Edit any forum topic content Delete own forum topic content...

Configuring Blocks

You can select various configuration setting for blocks on the Blocks Administration page. The configuration options include overriding the title of the block and setting the visibility of the block based on several optional parameters. As an example of how you might use these features in the future, let's change the Who's online block so that it only appears on the homepage of your site, and only when the visitor is a user who has logged into the system with a user ID and password. To make...

Creating a Horizontal Menu

The next requirement for our new theme is to create a horizontal menu that appears below the header. The first step in this process is to add a new region to the theme. To add a new region, edit the genesis_mytheme.info file and add the following line to the end of the list of regions contained within that file regions main_menu_links Main Menu Links This code instructs Drupal to include a new region with an internal name of main_menu_links to the list of available regions. The value to the...

Configuring the Genesis Theme

If you haven't done so already, follow the instructions in Chapter 6 and install the Genesis theme www.drupal.org project genesis . You'll notice that the installation process creates two versions of it Genesis base and Genesis subtheme. A majority of Drupal starter themes use subthemes as the mechanism for creating a new theme based on the foundation provided by the base theme. This allows you to create one or several new themes using the same underlying foundation without having to start from...

Approving Requests for User Accounts

Drupal lets you, the site administrator, determine how user accounts are created on your website. You can Allow site visitors to create their own accounts without approval by a site administrator. Allow site visitors to request an account, but require that a site administrator approve it before allowing the visitor to use the account. Restrict account creation to only the site administrator. The approach you use is completely dependent on whether you allow visitors to have their own accounts....