Chapter 16. Advanced Joomla! Mobilization

WHAT'S IN THIS CHAPTER?

  • Creating a template for Joomla! that will display CMS content in an appropriate way for a mobile device

  • Developing a plugin that will select that theme and allow you to further alter the content generated by the server

Some of the Joomla! extensions you reviewed in the previous section were bundled with templates to demonstrate how the switching algorithms worked or to provide you with a starting point for developing your own. In this chapter, much like you did for WordPress in Chapter 12 and Drupal in Chapter 14, you go through the process of creating your own template from scratch. This helps introduce you to understanding how Joomla!'s templating engine works, but it also allows you to build up your own look and feel from scratch.

In the second part of the chapter, you develop the header recognition and switching algorithms that you would need to switch the output of the CMS to this template for the devices that require it. We also look at how you can alter the platform's content (say, within articles) to ensure mobile compatibility.

DEVELOPING A MOBILE TEMPLATE

At first, Joomla!'s template system may seem a little different from that of WordPress and Drupal. The template is often a single file rather than a collection of fragments, and instead of using raw PHP to pull in template variables (as in Drupal) or call functions (as in WordPress), Joomla! makes use of special tags in the markup (such as <jdoc:.../>) to invoke ...

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.