Month: July 2004

How to NOT display Titles on Static Pages in Drupal

This is basically a way to style elements according to what kind of node they are in. So a title in a book page will look different than a title in a story.

This is based on some code written by Erik Hopp as shown in This thread
The idea is, we want each element to have a style assigned to it that not only makes a distinction between the ELEMENT type but the NODE type the element is in. So for example, instead of a title being styled only as

   <h1 class="title">This is the Title of a Static Page</h1>

we want the class name to specify that this title is within a “particular” type of node.

        <h1 class="title-page">This is the Title of a Static Page</h1>
or
         <h1 class="title-story">This is the Title of a Story</h1>
Continue reading