Optimising a site for mobile


I followed Andrew Embler's tutorial on how to make a mobile optimised website (http://www.concrete5.org/documentation/how-tos/designers/tutorial-building-an-iphone-optimized-version-of-a-concrete5-the/) which was totally awesome. However, I can't get the last bit referring to image auto-resizing to work. I followed the instructions he gave but it just breaks the rest of the page (i.e. the remaining content underneath the image vanishes). I've tried the way described and I've tried putting it in as a block template but nothing has worked and its driving me nuts! Can anyone help?

Also, could anyone describe how I might get a link to force the full website theme to display on a mobile device so that I can give visitors the choice of visiting the site in its full form from their mobile device.


View Replies:
Mnkras replied on at Permalink Reply
well, if you are using version 5.4.1 then i do not recommend trying that tutorial as caching borked it, for your specific problem, i think you may have an error (missing closing tag extra/missing char)
andrew replied on at Permalink Reply
The mobile theme as described in the tutorial only really has trouble if
Full Page Caching is involved, which is far from a requirement for most
sites. You can always just disable full page caching in Settings, which
leaves block level caching other site object caching unaffected.)
ZeroGodForce replied on at Permalink Reply
I'm not using caching as I don't really need it. I am fairly certain that there was nothing unclosed or unbalanced using that code, so I'm not sure it was that.

In fact after a hell of a lot of headbashing and experimenting with different bits of code found on one or two other posts, I actually managed to get it to work, although in truth, I am not 100% sure why this code worked while the other methods didn't. Nor am I sure that what I've used isn't going to cause problems for another part of the system.

$v = View::getInstance();
  if ($v->getThemeHandle() == 'mobile-3')
   $ih = Loader::helper('image');
   $fo = $controller->getFileObject();
   $filepath = $fo->getRelativePath();
   $thumbnail = $ih->outputThumbnail($fo, 300, thumbnailHeight);

I'm still quite new to concrete5 development so I'm not hugely confident that this code is fine to be left alone indefinately.

AccountDisabled replied on at Permalink Reply
If you still looking for a solution with easy links between full and mobile versions of your site then check out Mobile Home. More info in the concrete5 Marketplacehttp://www.concrete5.org/marketplace/addons/mobile-home/...