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

Configuring the output of a content type


A new content type, by default, will output all of its fields in the order in which they exist in the Manage fields tab. In this recipe, we will modify the order of the output fields in the Article content type and also change the way that the labels are displayed and finally see how we can apply some formatting options.

How to do it...

To begin, we will modify the order of the output fields, then change the hide the tags label, and finally we will update the Teaser view so it only displays a teaser of 400 characters:

  1. 1. Select Structure from the admin menu, then select Content types.

  2. 2. Select Manage display for the Article content type.

  3. 3. Drag the Image field below the Body field.

  4. 4. In the Tags row, in the Label column, set the drop-down value to<Hidden>:

  5. 5. Click on Save.

  6. 6. Select the Teaser button just below the tabs.

  7. 7. In the Body row, select the configuration cog.

  8. 8. In the Trim length field, update the default value to 400.

  9. 9. Click on...