How to Add Sections to your Drupal 7 Theme

For the first website I built in Drupal, we wanted to be able to change the background images in the header and behind the node content for different sections of the website. For example, in the Youth section of the site we wanted pictures of children playing, but in the News and Event sections we wanted something else. I looked around drupal.org and found many people asking for the same thing. Some threads had good suggestions, but no ready solution. The Section module apparently did what I wanted in Drupal 6 but was not yet ready for Drupal 7. After trying many of the ideas presented by the community and learning what works, I put together this easy, fast and efficient method of getting your website to respond to sections for nodes and for Views summary pages.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.