Drupal 7 is a modern Content Management System, famous 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.
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.
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.
Chapter 1, Installing and Configuring Drupal, begins with the Drupal fundamentals seeing how to install and configure a standard Drupal installation.
Chapter 2, Creating and Publishing Content, introduces the principles and methods of creating content, in addition to exploring the attributes and features common to Drupal content nodes, such as comments.
Chapter 3, Working with Blocks, explains how to create a range of blocks, from the basic content block, to the more advanced blocks used in menus and blocks created from views.
Chapter 4, Custom Content Types, explains how to create and configure simple and advanced custom content types.
Chapter 5, Using Views to Create Custom Lists, Grids, and Tables, explains how to create a wide range of views for uses such as news listings and image galleries.
Chapter 6, Creating Flexible Pages using Panels, explores the various ways to make use of panels. We see how to add content to panels, and how we can customize their layout for any situation.
Chapter 7, Working with Media, explains how to manipulate and utilize media files within your custom content types.
Chapter 8, Integrating Web APIs, explains how we can integrate with many of the social sites, such as Facebook and Twitter, and also how to integrate with Google maps, and the Add This bookmarking service.
Chapter 9, Creating Regular, Mobile, and Tablet Themes, explains how to build a new theme using a base theme, and then how to optimize and customize a theme.
Chapter 10, Working with Other Languages, explains how to use the third-party language modules that provide localization for all content within the system. Additionally, we explore how to manage languages, and how to switch between languages.
Chapter 11, Managing Users, explores the main tasks involved with user management, from creating and editing user accounts, to managing roles and permissions.
Chapter 12, Running Drupal, explores the issues relating to the day-to-day administration, including, updating modules, security, and backup.
To run the examples in the book following software will be required:
Web Server:
Apache recommended (The Drupal installation recipe is specific to an Apache installation).
Apache 1.3 or Apache 2.x, Apache 2.x recommended
Microsoft IIS 7
# |
Software Name |
URL |
---|---|---|
1 |
Apache | |
2 |
Microsoft IIS |
Database:
MySQL 5.0.15 or higher with PDO, SQLite 3.3.7 or higher
Microsoft SQL Server and Oracle are supported by an additional module
PHP:
PHP 5.2.5 or higher, PHP 5.3 recommended
# |
Software Name |
URL |
---|---|---|
1 |
PHP |
FTP client:
There are a number of free FTP clients; this is the recommended, cross-platform client:
# |
Software Name |
URL |
---|---|---|
1 |
FileZilla |
Text editor:
For editing local PHP, HTML, and CSS files, it's useful, but not essential, to use a tool such as Dreamweaver or Notepad++. Of course, you can always use a native text editor such as Notepad, if you would prefer.
# |
Software Name |
URL |
---|---|---|
1 |
Dreamweaver |
http://www.adobe.com/products/dreamweaver.html (commercial) |
2 |
Notepad++ | |
3 |
Eclipse |
This book is for people who are familiar with the concepts of web development and CMS. If you have previous experience of working with Drupal, then this book will further your knowledge and give you ideas for fun new things to do with Drupal.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "Ensure that register globals is set to off in the PHP.ini
file."
A block of code is set as follows:
name = Bartik extra base theme=bartik description=A Bartik sub-theme which provides a navigation region core = 7.x
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<?php // We hide the comments and links now so that we can render them later. hide($content['comments']); hide($content['links']); ?><div class="recipe-instructions"><?php print render($content['body']);?></div><?php ?><div class="recipe-ingredients"><?php print render($content['field_recipe_ingredients']);?></div><?php print render($content); ?>
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Select Standard option and then select Save and continue."
Feedback from our readers is always welcome. Let us know what you think about this book — what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books — maybe a mistake in the text or the code — we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.