Mobile Drupal Sites - The most flexible way ever?

The past few months I've been working on a Drupal site and one requirement was for a mobile site. It needed to be a scaled down version of the site, with of course a simplified theme, and only a few features.

Conventional wisdom seems to say that my two options for a mobile site are either build a separate site, and redirect users based on the device they come in on, or I could just switch themes and style sheets and make my modifications there. But I'm using a content management system. I shouldn't have to build two sites, right? Right! ..that's when I came up with this solution:

This year, Earl Miles (merlinofchaos) has been putting a lot of work in to Panels 3. As a part of the new version he has extracted some parts of it and put it into the "ctools" module package. One in particular is called Delegator. In true merlinofchaos fashion, this is a very flexible module that gives a lot of options. It lets you re-route pages like the node page or user page, or custom pages to a panel, based on rules. One of the possible rules is to route based on user roles, so that a user that's say, a moderator, can see a completely different panel than an authenticated user. This opens doors to all kind of possibilities.

So now, imagine you could route to a different panel based on device type. Well with one extra module, you can. The mobile tools module has a small feature that allows you to specify a "mobile role" for any of your pre-existing roles. So, for example, all Drupal sites have the "authenticated user" role as well as the "anonymous user" role. Mobile tools allows you to assign a mobile equivalent of each of these.

So, couple these two relatively new modules together, and you can serve up 100% different, or 50% different panels, or whatever you want, based on the same database and content, without having to enter in to Drupal multi sites.

Mobile tools also allows you to switch themes based on different devices, so you now have a fully flexible, completely customizable mobile site. Not bad, eh?

Comments

Mobile phones

Mobile phones is most important and it using everyone in the world.has been putt a lot of work in to Panels tools.someone had the phone to get his mobile phone number reactivated after his handset was stolen and there are Communications to each other.Mobile tools also allows to switch themes based on different devices, so that have a fully flexible, completely customizable mobile site.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options