Chapter 14. Advanced Drupal Mobilization

WHAT'S IN THIS CHAPTER?

  • Creating a mobile theme for Drupal, exploring how to display nodes and lists of teasers with its template system

  • Considering how you might theme other page elements, such as menu navigation, blocks, and comments

  • Developing a Drupal module that allows the recognition of devices, the switching of themes, and the conditional rewriting of content

  • Ways in which you might apply mobile enhancements to certain other popular Drupal modules

As you've done for WordPress, this chapter follows the exposition of common mobile modules and themes for Drupal with an adventure in creating something of your own. You will follow a similar path: First, you look at the basics of a simple mobile theme, and then you explore the Drupal API, with the creation of your own module to replicate the functionality you need to switch and adapt content for mobile devices.

The modules that you looked at in Chapter 13 were quite capable of using a wide range of themes, and indeed they were well equipped to provide different themes to multiple genres of devices. In theory, the theme that you develop in the first part of this chapter can be dropped in for use with those third-party modules.

Throughout this chapter, you will predominantly look at solutions that can be used on Drupal version 6, which is the current and primary version at the time of this writing. Version 7 is a considerable update to the platform and makes several significant changes to the CMS's ...

Get Professional Mobile Web Development with WordPress®, Joomla!®, and Drupal® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.