Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Dollars5 on
Is it possible to create a mobile edition of a Drupal site that my mobile users will connect to http://mysitename.mobi and ergular users will connect to http://mysitename.com and I provide same content for both only difference being mobile edition is light weight and normal edition is full featured.
Any example of such and tips on how to achieve it would be kind of you all.
- Dollars5
Dollars 5 Solution
Comments
Any Example or Suggestions?
Hi All,
Since my company is a mobile software/consulting firm - I can expect users also connecting to my site via - mobile. Do I need to install a seperate site or drupal allows to provide the same content as lite edition?
TIA.
Dollars 5 Solution
Mobile Software Developer
One possibility...
Use drupal's multisite hosting capabilities to set up two directories in your /sites folder: one for yoursite.com, and another for yoursite.mobi. The settings.php files for both sites can point to the same database, but the settings file for the .mobi site can force the site to use a different theme -- one that outputs the lean and mean 'mobile friendly' HTML and CSS.
You'll have to keep copies of the same modules in each directory under /sites, but this setup would allow you to have two very different looks based on domain.
--
Eaton's blog | VotingAPI discussion
--
Eaton — Partner at Autogram
Is that the Only Solution?
When I went through some posts - me too thought of the same by having two sites sharing the same DB - Is it possible? Any pointers?
Isn't there a better solution?
Thanks for the help anyways.
Dollars 5 Solution
Mobile Software Developer
try the .mobi theme
I created a new theme just for this purpose: http://drupal.org/project/mobi
You leave a regular theme as the default and then the .mobi loader module (http://drupal.org/project/mobi_loader) will load the .mobi theme when visitors go to the .mobi domain alias.
It took 3 hours to do it all, so I'm sure there are all kinds of features that could be added. I hope it'll attract patches for new, cool stuff.
As mobile devices become
As mobile devices become increasingly popular micro browser detection and support should be considered in the Drupal core.
FatAtlas.mobi - WebKit/SmartPhones alpha site
I have a alpha smartphone/webkit site that is running under a single code base. Detail are here http://drupal.org/node/192183.
James
FatAtlas.com