I am happy that you figured it out ;)
Thanks,
Anne
Printable View
Hi,
Is there a quick way to center the flexible footer content the same way it is on winchester_black?
Thanks,
Have anyone install the MSRP mod for the Westminster New?
Thank You,
Larry
Hi there, thanks for this amazing template! The flexibility of the mobile detect is awesome :)
One question (not sure if it's been covered before - couldn't find it) is there a way of switching between desktop & mobile sites manually? So a link on the mobile site to "show desktop version" and maybe a link on the desktop site to switch back to the mobile version?
I've tried googling it and the only references I can find are to using cookies to set the version and then redirect back to the desktop site (when you have 2 versions of a website) obviously this doesn't apply to this situation though :(
Thanks!
Tony
Thanks! I can not take credit for the php mobile detect integration though. This is based on rbarbour's DIY Template Default Package, so kudos go to him ;)
You can switch use these urls:
your url.com/index.php?main_page=index&display_mode=isDesktop
your url.com/index.php?main_page=index&display_mode=isMobile
your url.com/index.php?main_page=index&display_mode=isTablet
Thanks,
Anne
Thanks Anne, the URL's are kind of working to switch layouts, it's not 100% though?
For example the site switches from mobile to desktop when the "view desktop" link is clicked but the mobile menus are still rendered instead of the desktop ones, the left column is missing as per the mobile version and the center column that displays the top level categories is still 1 product per row instead of 3 per row (as per the desktop version)
I've added a new check for the 'isDesktop' to alter the viewport so that a user can zoom etc
which is working fine?Code:<?php
if ($_SESSION['display_mode']=='isDesktop') { ?>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" />
<?php } else {?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<?php } ?>
Ive seen the mobile detect code towards the bottom of the html_header.php file which looks to control the loading of the stylesheets etc and tried tweaking it but nothing seems to fix it properly?
Thanks
Tony
Just a quick update - I think it've just about got it working :)
There is a logic error in the mobile detect in the template - nothing major and most people probably won't want to switch templates like I am doing but just in case they do!
html_header.php change the follwing line
toCode:if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
echo $responsive_mobile;
The first code checks for a mobile device (but not a tablet) and returns true because - well it is true, but it doesn't check for the isDesktop in the $SESSION so it also catches anyone who is on a mobile but has chosen to view the desktop version.Code:if ($detect->isMobile() && !$detect->isTablet() && !$_SESSION['display_mode']=='isDesktop' or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
echo $responsive_mobile;
The same code is also in tpl_main_page.php and needs tweaking - this now fixes the column layouts and the missing left column and shows the correct desktop header but I am still missing the desktop main menu... I'll keep digging :)
Tony