O'Reilly logo

Drupal 7 Module Development by Ken Rickard, John Wilkins, Larry Garfield, Matt Butcher, Greg Dunlap, Matt Farina

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

Chapter 4. Theming a Module

Now that you've learned the architecture of the theme layer, let's put that knowledge to practical use. In this chapter, we'll write some real code that both uses existing theme implementations and builds new theme implementations.

While the previous chapter was a whirlwind tour of the theme layer, this chapter will be a more thoughtful exploration of the system and how to best use it. We'll touch on the following ideas:

  • The advantages of being lazy by reusing code
  • Finding and reusing a theme hook
  • Attaching CSS to render elements
  • Creating stylesheets for RTL languages
  • Building a theme hook

To help us learn these points, we're going to build a simple module in our examples. Drupal comes with the blog module, which creates multi-user ...

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