iphone Layout

Professional Jomal template designed to be easily adaptable to all kinds of business
GK User
Mon Jun 27, 2011 10:01 am
Hi guys,

How do I totally disable the the iphone layout? In the template settings I have chosen default for everything but the menu still appears as a iphone drop down when the website is viewed on an iphone?

Thanks in advance!

website url for reference is clients.turtlecolour.co.uk/niche

Gary
User avatar
Junior Boarder

GK User
Mon Jun 27, 2011 11:48 am
Found this deep down the message boards for anybody that has same problem....

****************

Problem is caused by fact that menu functions has own mobile check condition.
That's why the mobile menu is visible on the default layout. In general it isn't
a bug. For this user I recommend to change file gk.template.helper.php and
replace function getMenuType with below code:

function getMenuType () {
global $Itemid, $option;

$page_menus = $this->_tpl->params->get ('page_menus');
$page_menus = str_replace ("<br />", "n", $page_menus);
$pmenus = new JParameter ($page_menus);

$menutype = $pmenus->get($Itemid);
if (is_file(dirname(__FILE__).DS.'menu'.DS."$menutype.class.php")) return
$menutype;
$menutype = $pmenus->get($option);
if (is_file(dirname(__FILE__).DS.'menu'.DS."$menutype.class.php")) return
$menutype;
$menutype = $this->getParam(GK_TOOL_MENU, 'css');
if (is_file(dirname(__FILE__).DS.'menu'.DS."$menutype.class.php")) return
$menutype;
return 'css';
}
User avatar
Junior Boarder

GK User
Fri Mar 16, 2012 12:12 am
I just had the same problem. For some reason the template I have didn't include a gk.template.helper.php file. However I found the getMenuType in lib/gk.framework.php. There I just removed the case'gk_iphone' section and it worked. It starts on line 204.


switch ($menu_type) {
case 'gk_iphone' :
$file = dirname(__file__) . DS . 'menu' . DS . 'GKIPhone.php';
if (!is_file($file)) return null;
require_once ($file);
$menuclass = 'GKIPhone';
$this->generateSubmenu = false;

break;
case 'gk_handheld' :
$file = dirname(__file__) . DS . 'menu' . DS . 'GKHandheld.php';
if (!is_file($file)) return null;
require_once ($file);
$menuclass = 'GKHandheld';
$this->generateSubmenu = false;
break;
case 'gk_menu':
$file = dirname(__file__) . DS . 'menu' . DS . 'GKMenu.php';
if (!is_file($file)) return null;
require_once ($file);
$menuclass = 'GKMenu';
$this->generateSubmenu = false;
break;
case 'gk_dropline':
$file = dirname(__file__) . DS . 'menu' . DS . 'GKDropline.php';
if (!is_file($file)) return null;
require_once ($file);
$menuclass = 'GKDropline';
$this->generateSubmenu = true;
break;
case 'gk_split':
$file = dirname(__file__) . DS . 'menu' . DS . 'GKSplit.php';
if (!is_file($file)) return null;
require_once ($file);
$menuclass = 'GKSplit';
$this->generateSubmenu = true;
break;
default:
$file = dirname(__file__) . DS . 'menu' . DS . 'GKMenu.php';
if (!is_file($file)) return null;
require_once ($file);
$menuclass = 'GKMenu';
$this->generateSubmenu = false;
break;
}


Hope that helps someone else.
User avatar
Fresh Boarder


cron