O'Reilly logo

Drupal 7 Fields/CCK by Dave Poon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – editing a template file

In this section, we will edit the code in the node--recipe.tpl.php template file. We will control the order of the fields by modifying the code, the order will start from Image, Body, Difficulty, Recipe category, and finally end with the File field.

  1. Open the node--recipe.tpl.php template file in your favorite text editor such as Textmate or Notepad++. If you scroll down, you will see some PHP and HTML code in this file, as shown in the following screenshot:
    Time for action – editing a template file
  2. Navigate to one of the recipes in our yummy recipe Drupal site. In this example; we go to the Homemade Chocolate Cake recipe content.
  3. To make sure we are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required