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

Adding a biography field to the user profile


In its default configuration, the Drupal user profile features only a few fields such as Username, Password, E-mail, and Picture. There are many potential use cases where you would want to add more fields. Drupal makes it very easy for us to add additional fields to the user profile, and it's done in much the same way as you would edit a content type. In this recipe, we will be adding a new Long text field to the user profile to provide the user with the option of adding a biography.

Note

Adding too many fields to a user profile can have performance implications. The user object is always loaded, and with it, any extra fields added to it.

Getting ready

To complete this recipe you will need to have completed the first recipe in this chapter, Creating new user accounts.

How to do it...

We will begin by creating a new Biography field for the user profile. We will then configure the field and set its position in the backend form, and finally, we will update...