Drupal Basic


Drupal

Drupal is a free and open-source CMS written in PHP and distributed under the GNU General Public License. Drupal stems from a project by a Dutch university student, Dries Buytaert. The goal of the project was to provide a mechanism for Buytaert and his friends to share news and events. Buytaert turned Drupal into

an open-source project in 2001, and the community readily embraced the concept and has expanded on its humble beginnings, creating what is now one of the most powerful and feature-rich CMS platforms on the Web. Individuals, teams, and communities leverage Drupal’s features to easily publish, manage, and organize content on a variety of web sites, ranging from personal blogs to large corporate and government sites.

The standard release of Drupal, known as Drupal core, contains basic features that can be used to create a classic brochure web site, a single- or multi-user blog, an Internet forum, or a community web site with user-generated content. Features found in Drupal core include the ability to author and publish content;

to create and manage users, menus, and forums; and to manage your site through a web browser-based administrative interface.

Drupal was designed to be enhanced with new features and custom behavior by downloading and enabling add-on modules. There are thousands of additional modules (known as contributed or “contrib” modules) that extend Drupal core’s functionality, covering a broad spectrum of capabilities, including e-commerce, social networking, integration with third-party applications, multimedia, and other categories of capabilities.

Drupal can run on any computing platform that supports both a web server capable of running PHP version 5.5.9+ (including Apache, IIS, lighttpd, and nginx) and a database (such as MySQL, SQLite, or PostgreSQL) to store content and settings.

 

Drupal Core

When you download and install Drupal, you are installing what is commonly called Drupal core. Core represents the “engine” that powers a Drupal-based web site, along with a number of out-of-the-box features that enable the creation of a relatively full-featured web site. The primary components of Drupal core include capabilities to create and manage the following:

• Content

• File uploads/downloads

• Menus

• User accounts

• Roles and permissions

• Taxonomy

• Views to extract and display content in various forms such as lists and tables

• WYSIWYG-based content editor

• RESTful web services

Drupal core also includes a feature-rich search engine, multilingual capabilities, and logging and error reporting.

 

Contributed Modules

Although Drupal development can be used to build feature-rich web sites, there are likely situations where core lacks the functionality needed to address specific requirements. In such cases, the first step is to search through the thousands of custom modules, contributed by developers from all around the world to the Drupal project, for a solution that meets your needs. It’s very likely that someone else had the same functional requirement and has developed a solution to extend Drupal core to provide the functionality that you need.

To find a contributed module, visit the drupal.org web site at drupal.org/project/project_module.

You will find a general list of categories and the current number of contributed modules (for all versions

of Drupal) contained within each. Here is a short sampling of the types of categories and the number of modules you can find in each (modules are added to the list on a daily basis, and the number of modules in each category will have grown considerably since the time of this writing):

• Administration (1655)

• Commerce/Advertising (808)

• Community (733)

• Content (2679)

• Content Display (2169)

• Content Construction Kit (CCK) (710)

• Developer (1494)

• E-commerce (1245)

• Media (1083)

• Mobile (212)

• Third-party Integration (2616)

• Utility (2695)

To find modules that are supported on Drupal 8, select 8.x for the “Core Compatibility” search filter.

A few of the most popular contributed modules, and the ones that you will likely want to install, include the following (also check out the “Most Installed” list to the right of the search filters):

• Drupal Commerce: A full-featured web storefront module that provides all of the mechanisms required to sell products (physical as well as electronic downloads), collect credit card payments, and manage shipments. If you want to sell something on your web site, this is the module you will want to use.

• Display Suite: Allows you to take full control of how your content is displayed using a drag-and-drop interface.

• Calendar: Provides the ability to create and render a list of events on a calendar.

• Backup and Migrate: Handles scheduled backups of content in your Drupal database, with the ability to restore the database to a previous state based on one of the backup files created by this module. This is a must-have module for any production web site. You may also use this module to migrate content from one Drupal site to another.

• Google Analytics: Provides a simple-to-use form for setting up Google Analytics on your site. Google Analytics is a free service that tracks the number of visitors to

your web site, where those visitors came from, what search terms they used to find your site, the pages they visited while on your site, how long they spent on your site, and many other useful metrics that will help you view and understand the usage

of your web site. For more information on Google Analytics, visit www.google.com/ analytics.

• Pathauto: Creates search engine–friendly URLs by automatically generating a “pretty” URL that is based on the page’s title (such as www.example.com/examples instead of the default Drupal URL of www.example.com/node/1234).

• Scheduler: Provides the ability to specify the date that a node will become published on the site, and the date when a node will no longer be published. This allows a content author to create a node now and have it not appear on the site until some date in the future.

 

Drupal Themes

A theme is a Drupal component that defines how the pages on your web site are structured and the visual aspects of those pages. A Drupal theme defines attributes of your web site such as:

• How many columns of information will be presented on a page (a three-column layout with a left, center, and right column; a two-column layout with a narrow left column and a wide right column for content; a one-column layout, and the like)

• Whether a page has a banner at the top

• Whether a page has a footer

• Where navigational menus appear (at the top of the page, under the banner, in the right column, and so on)

• The colors used on the page

• The font and font size used for various elements on a page (such as headings, titles, and body text)

• Graphical elements, such as logos

 

Drupal core includes a number of off-the-shelf themes that you can use for your new web site. You may also download one or more of the hundreds of free themes that are available at drupal.org/project/ project_theme, or you can create your own theme by following the directions found at drupal.org/ documentation/theme.

 

Creating Content

A web site without content would be like a book without words, a newspaper without news, and a magazine without articles: hardly worth the effort of looking at. Drupal 8 makes it easy to create, publish, and manage content on your new web site. Let’s look at how simple it is by creating your first piece of content. If you

haven’t installed Drupal 8 yet, visit www.drupal.org/docs/8/install and follow the step-by-step process for

installing and configuring Drupal 8 core.

There are multiple paths for getting to the content-authoring screens in Drupal. I’ll focus on the simplest, but there are several paths for creating content in Drupal 8.

On the front page of your new web site, you will see an Add Content link beneath the “No front page content has been created yet” message on your homepage. In the left column, you will also see an Add Content link in the Tools menu. Click either of the links: they both take you to the content editing form, where you will create your first piece of content.

Next, you’ll see a list of the content types that you can use . Drupal 8 comes with two basic content types: an article and a basic page. Both content types provide you, the author, with a text field for entering the title of the content item and a body text area where you can write. Different content types provide additional elements. In the case of an article, you have the ability to enter “tags” for categorizing your content and an image. I cover tagging and several other content types later in the book, as well as the capability for creating your own custom content types.

Start with the simplest content type, a page, as the basis for your first content item on your new web site. Click the Basic Page link, which opens the content creation form for creating that content type

 On this form, enter the title of your first article and some text into the body area. After you have entered the title and body of your article, click the Promotion Options link in the right sidebar, and from the list of options presented, notice the Promoted to Front Page checkbox. When this option is checked, it tells Drupal to display this article on the front page of your site. If it is not checked by default, click on the checkbox to select it. Finally, scroll down to the bottom of the page and click the Save and Publish button.


 

Comments