0

I'm pretty new to this 'world of Drupal', and I've got this project, where I need to build a jQuery Mobile site based on an existing Drupal 6 site.

The mobile site is somewhat different in it's structure, but needs to get some data/content from the original site.

What is the best approach to his project? Should I build the mobile site based on the same Drupal-installation, as the original site? Or should I build a new site using Drupal 7 and then somehow export/distribute content from the original site?

I've read a couple of articles claiming it's quite difficult to upgrade jQuery to version 1.4.4 in Drupal 6, which is needed to run jQuery Mobile. Is that so?

My concern is, that I'm not a PHP Jedi Master (though I know some PHP), and therefore it would be great, if some could tell me, what the best approach is to this.

I found this articles yesterday: http://www.adyax.com/en/tutorials/make-mobile-version-your-drupal-site-using-jquery-mobile-and-some-magic/lets-get-started. Is this what I should be doing?

3 Answers 3

1

I personally don't recommend splitting the project in 2 sites but rather in 2 themes. If the project is slightly different (I assume you however use the same database) then try to customized it via theme (and theme functions).

I suggest you use the Omega/Fusion Theme which are responsive themes. A responsive theme doesn't need a special redirection.

However if you need more customization in additional install Mobile Tools Module.

Then create a domain called m.domain.com in additional to your site domain.com and set inside the Mobile Tools Module based on a agent to switch to the theme needed.

There's indeed no need to install Drupal again. You should ask your host to treat the m.domain.com as an alias for domain.com. That way it points to the same Drupal installation and the theme switch can take place.

If you don't have a mobile to test install Firefox addon: https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/

2
  • The thing is, that the mobile site has a totally different structure in both menu and obviously in layout. There's only a couple of things from the original site, that needs to be "transfered" to the mobile site... Should I then still use one Drupal installation?
    – dgsunesen
    Commented Oct 18, 2011 at 12:49
  • You can easily customize the layout in n-ways using Delta+Context modules. Regarding the menu grid you can set up a new menu to display for mobile theme only. Hope that helps. There is no reason you could use 2 platforms for same project Commented Oct 18, 2011 at 13:03
0

I would stick to one code base and use a module like ThemeKey to switch themes based on useragents. Themekey is available for both Drupal 6 and 7 so you might be best going the Drupal 7 route for a newer version of jQuery.

If you would like to only use one theme then like Onirio says you can use Omega theme for reactive design. Omega is pretty powerful but from what I've seen it has a fairly steep learning curve.

2
  • So what about the link I referred to? That's no go?
    – dgsunesen
    Commented Oct 18, 2011 at 11:42
  • It's still possible, my way just requires less custom code, although you don't get mobile.blah.com at the end of it, which is arguably better. I've not actually had much luck using jquery mobile theme in drupal, although this was a while ago so things might have progressed.
    – digital
    Commented Oct 18, 2011 at 14:23
0

Didn't realize how that you had to use two patches, one to core and one to jquery_update http://echodittolabs.org/blog/2010/08/drupal-6x-jquery-142-new-possibilities, to get jQuery 1.4.4. Personally haven't needed to use that version yet. If the sites are not sharing that much content to make them use the same codebase then the domain module is not needed.

It seems to me that it would be less trouble to create another site in drupal 7 that is the mobile version and then create the proper redirects for mobile devices. You could still share content between sites through the feeds module. At least with this route you wouldn't have to hack around just to get the right jquery version.

2
  • Okay - maybe that's the solution. Do you know some good tutorials/guides for that feeds module? Much appreciated :)
    – dgsunesen
    Commented Oct 19, 2011 at 6:59
  • pretty much just use views to create the feed from the origin site and then use the feeds importer on your mobile site. It is pretty straight forward, and they give some links in the documentation section of the project drupal.org/project/feeds.
    – jdwfly
    Commented Oct 24, 2011 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.