I wanted to create a mobile version of my site, but when I read the notes on the mobile site extension it said that the optimal method is to have a sub domain http://m.website.com
. My host doesn't allow me to do that. Instead I created two identical weblogs, one called 'full' and the other 'mobile', pointing to different templates. I think this is an elegant solution. A link in the footer allows the user to switch between the two and it has worked well.
Unfortunately if the user is reading an article, and they want a mobile or desktop view of that article they lose it, because the link drops back to the homepage of the weblog. I noticed in this forum that this may have been fixed by the mobile site extension, where the article entry is retained, so I had another look.
I've just enabled the extension and pointed the domain name to my [full] website. I can't tell if it detects the browser or not because anything accessing it now simply displays the mobile template for the site, whether it's a desktop or mobile device. This wasn't really how I expected it to work. The extension settings would suggest that it's only activated when a mobile device is detected and then it would use the mobile template. It's using the mobile template regardless. Clearly the domain is an important aspect of this extension. But what is the suboptimal method I could use?
What I want is to detect the browser or user agent, and then load a different weblog, is that possible? Of course I need some way of being able to drop back to the desktop view without redirecting, so I'm guessing some cookie will need to record if it's already been redirected.
In failing that I need a weblog or a template switcher, that will retain the article when it switches.
Any ideas anyone?