hide 'switch to mobile site' link

Professional Jomal template designed to be easily adaptable to all kinds of business
GK User
Wed Jul 04, 2012 6:13 pm
How can I hide this link?

When I choose "iphone = defaul layout" I still see the link. I do not want any mobile version of my site.

thank you!
User avatar
Expert Boarder

GK User
Thu Jul 05, 2012 1:44 pm
Hi,

Open file: \templates\[YOUR-TEMPLATE]\layouts\default.php

Remove this code:
Code: Select all
<?php if(isset($_COOKIE['gkGavernMobile'.$tpl_name]) &&
              $_COOKIE['gkGavernMobile'.$tpl_name] == 'desktop') : ?>
              <div class="mobileSwitch">
            <a href="javascript:setCookie('gkGavernMobile<?php echo $tpl_name; ?>', 'mobile', 365);window.location.reload();"><?php echo JText::_('TPL_GK_LANG_SWITCH_TO_MOBILE'); ?></a>
             </div>
    <?php endif; ?> 
User avatar
Platinum Boarder

GK User
Tue Jul 10, 2012 2:09 pm
Cannot find this line in my templates/gk_finance_business/layouts/default.php

Code: Select all
<?php

/**
 *
 * Default view
 *
 * @version             1.0.0
 * @package             Gavern Framework
 * @copyright         Copyright (C) 2010 - 2011 GavickPro. All rights reserved.
 *               
 */
 
// No direct access.
defined('_JEXEC') or die;
if($this->getParam("cwidth_position", 'head') == 'head') {
$this->generateColumnsWidth();
}
$this->addCSSRule('#gkWrap1, #gkWrap2, #gkWrap3 { width: ' . $this->getParam('template_width','980px') . '; }');

$tpl_page_suffix = '';

if($this->page_suffix != '') {
   $tpl_page_suffix = ' class="'.$this->page_suffix.'"';
}

$user = JFactory::getUser();
// getting User ID
$userID = $user->get('id');
// getting params
$option = JRequest::getCmd('option', '');
$view = JRequest::getCmd('view', '');
// defines if register is active
define('GK_REGISTER', ($this->modules('register') ? $userID == 0 : false));
// defines if login is active
define('GK_LOGIN', $this->modules('login'));
// defines if com_users
define('GK_COM_USERS', $option == 'com_users' && ($view == 'login' || $view == 'registration'));

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:og="http://ogp.me/ns#"
     xmlns:fb="http://www.facebook.com/2008/fbml"
     xml:lang="en" lang="en">
<head>
    <?php if($this->getParam("chrome_frame_support", '0') == '1') : ?>
    <meta http-equiv="X-UA-Compatible" content="chrome=1"/>
    <?php endif; ?>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
   
    <jdoc:include type="head" />
    <?php $this->loadBlock('head'); ?>
</head>
<body<?php echo $tpl_page_suffix; ?>>
   <?php if($this->browser->get('browser') == 'ie6' && $this->getParam('ie6bar', '1') == 1) : ?>
   <div id="gkInfobar"><a href="http://browsehappy.com"><?php echo JText::_('TPL_GK_GAVERN_IE6_BAR'); ?></a></div>
   <?php endif; ?>
   
   <?php $this->messages('message-position-1'); ?>   
   
   <div id="gkBg">   
      <div id="gkWrap1">
         <?php $this->loadBlock('nav'); ?>
         
         <?php $this->loadBlock('header'); ?>
      </div>
    </div>
   
    <?php $this->messages('message-position-2'); ?>
   
    <div id="gkWrap2">   
       <?php $this->loadBlock('top'); ?>
       
       <?php $this->loadBlock('main'); ?>
       
       <?php $this->loadBlock('user'); ?>
    </div>
   
    <div id="gkWrap3">
             <div id="gkBottomWrap_alt">
             <div id="gkMiddleBar_alt">
                 <?php if($this->getParam('socialIcons', 1)) : ?>
            <div id="gkSocialIcons">
                <?php if($this->getParam('socialIcons3', 1)) : ?>   
            <a href="<?php echo $this->getParam('socialIcons3url', '', true); ?>" id="gkIconsFacebook" target="_blank"><?php echo $this->getParam('socialIcons3text', ''); ?></a>
            <?php endif; ?>
            <?php if($this->getParam('socialIcons2', 1)) : ?>   
            <a href="<?php echo $this->getParam('socialIcons2url', '', true); ?>" id="gkIconsVimeo" target="_blank"><?php echo $this->getParam('socialIcons2text', ''); ?></a>
            <?php endif; ?>
                <?php if($this->getParam('socialIcons1', 1)) : ?>   
            <a href="<?php echo $this->getParam('socialIcons1url', '', true); ?>" id="gkIconsTwitter" target="_blank"><?php echo $this->getParam('socialIcons1text', ''); ?></a>
            <?php endif; ?>
         </div>
         <?php endif; ?>
               <?php if( $this->modules('search') ): ?>
                <div id="gkSearch">
                  <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
              </div>
            <?php endif; ?>
        </div>   
       <?php $this->loadBlock('bottom'); ?>
        </div>
        <div id="gkFooterWrap">   
       <?php $this->loadBlock('footer'); ?>
        </div>
    </div>
   
     <?php if((GK_REGISTER || GK_LOGIN) && !GK_COM_USERS) : ?>   
   
       <?php if(GK_LOGIN): ?>
       <div id="gkPopupLogin">   
          <div class="gkPopupWrap">
             <?php $this->loadBlock('tools/login'); ?>
          </div>
       </div>
       <?php endif; ?>
      
       <?php if(GK_REGISTER): ?>
       <div id="gkPopupRegister">   
          <div class="gkPopupWrap">
             <?php $this->loadBlock('tools/register'); ?>
         </div>
      </div>
      <?php endif; ?>
      
    <div id="gkPopupOverlay"></div>
    <?php endif; ?>
   
   <?php $this->loadBlock('social'); ?>
   
   <jdoc:include type="modules" name="debug" />
</body>
</html>
User avatar
Expert Boarder

GK User
Thu Jul 12, 2012 4:28 pm
I posted in the wrong forum, sorry. I am using the financial business template.
User avatar
Expert Boarder

GK User
Thu Jul 12, 2012 10:45 pm
So, remove this code:
Code: Select all
<?php if(isset($_COOKIE['gkGavernMobile'.JText::_('TPL_GK_LANG_NAME')]) &&
      $_COOKIE['gkGavernMobile'.$tpl_name] == 'desktop') : ?>
      <span class="mobileSwitcher"><a href="javascript:setCookie('gkGavernMobile<?php echo $tpl_name; ?>', 'mobile', 365);window.location.reload();"><?php echo JText::_('TPL_GK_LANG_SWITCH_TO_MOBILE'); ?></a></span>
   <?php endif; ?>

In file: /templates/gk_finance_business/layouts/blocks/footer.php

Please try and let me know if it helps.
User avatar
Platinum Boarder


cron