Getting Drupal ready for mobile
Mobile internet use is growing rapidly and the question 'howto create a mobile version of my (Drupal) website?' is heard more and more often. Drupal offers different ways to provide mobile content for your users.
The people at Siruna made a great slideshare to explain different possible strategies to handle mobile versions of your website. They also made the blog mobiledrupal.com with much more information on getting Drupal mobile.
These are the strategies:
- creating a separate url for mobile and desktop content and a different theme
- automatically redirect mobile users to the mobile theme
- combine 1 and 2 and use mobile roles to select information
The advantage of having seperate url's is giving users the ability to choose which version they prefer. This is a good thing because modern mobile devices can render normal webpages decently (and provide good user interaction using zoom and pan) and users might prefer to visit the 'normal' site this way.
The best flexibility is reached with option 3. This way, not only can you provide your mobile users a special layout, but you can also select which information they should see because they use a different role. Mobile users are still automatically redirected to the mobile url, with a different template, but can choose to go back to the normal site using a clearly visible link.
You will need a detection method to guide your users to the desired layout/content. This can be achieved with the mobile tools module. This module detects the browser user agent and let's you choose a mobile theme and/or seperate url's for your mobile content, based on chosen options.
A good start point for a mobile theme could be 'mobile' or 'iUI'. The latter displays your website in an 'iphone like' user interface using the User Interface Library for Safari development on iPhone. Of course, you could also use your original theme and restructure/restyle it to fit mobile screens. Either way you will probably customize the template to fit your needs.
Templating is one thing, but if you would like to present different content to your mobile users you will need to setup mobile roles (optional with the mobile tools module). That way, you can use the built-in permission system and create special content for your mobile visitors. For example a different frontpage and menu items.
If you are a developer and want more, you might be interested in WURFL (Wireless Universal Resource Files). This module provides device capability detection as an API but you will need to setup the WURFL Library. It also integrates with mobile tools. You can read more about this here.
@twom on Twitter to get all the ins and outs on mobile Drupal.