gkLogo and Mutilanguage Site

GK User
Tue Mar 17, 2015 8:42 am
Hello, I have 2 template style, one for each of my two languages for my multilanguage joomla setup.

I notice that when on the secondary language, If I click on the gkLogo (top left) it brings me back to the primary language.

Primary Language:
http://www.mauzaza.com/en/
Template Style used: gk_university - Default - English

Secondary Language:
http://www.mauzaza.com/id/
Template Style used: gk_university - Default - Indonesian


Would there be anyway to have my the gkLogo link pointing at the corresponding language homepage?

Thank you
Regards
User avatar
Platinum Boarder

GK User
Sat Mar 21, 2015 6:42 am
Hello,

Unfortunately it will need custom code changes in the layouts/blocks/logo.php file - please replace its content to:

Code: Select all
<?php
// No direct access.
defined('_JEXEC') or die;
$logo_image = $this->API->get('logo_image', '');
if(($logo_image == '') || ($this->API->get('logo_type', '') == 'css')) {
     $logo_image = $this->API->URLtemplate() . '/images/logo.png';
} else {
     $logo_image = $this->API->URLbase() . $logo_image;
}
$logo_text = $this->API->get('logo_text', '');
$logo_slogan = $this->API->get('logo_slogan', '');
$lang = JFactory::getLanguage();
$lang_code = substr($lang->getTag(), 0, 2) . '/';
?>

<?php if ($this->API->get('logo_type', 'image')!=='none'): ?>
     <?php if($this->API->get('logo_type', 'image') == 'css') : ?>
     <a href="<?php echo JURI::root() . $lang_code; ?>" id="gkLogo" class="cssLogo"><?php echo $this->API->get('logo_text', ''); ?></a>
     <?php elseif($this->API->get('logo_type', 'image')=='text') : ?>
     <a href="<?php echo JURI::root() . $lang_code; ?>" id="gkLogo" class="text">
      <span><?php echo $this->API->get('logo_text', ''); ?></span>
       
        <?php if($this->API->get('logo_slogan', '') != '') : ?>
        <small class="gkLogoSlogan"><?php echo $this->API->get('logo_slogan', ''); ?></small>
        <?php endif; ?>
     </a>
     <?php elseif($this->API->get('logo_type', 'image')=='image') : ?>
    <a href="<?php echo JURI::root() . $lang_code; ?>" id="gkLogo">
        <img src="<?php echo $logo_image; ?>" alt="<?php echo $this->API->getPageName(); ?>" />
     </a>
     <?php endif; ?>
<?php endif; ?>
User avatar
Administrator

GK User
Mon Mar 23, 2015 3:47 am
Perfect it work. You say "unfortunately", does that need I will need to keep a backup of the file and replace any updated layouts/blocks/logo.php with the custom one?

Thank you
Regards
User avatar
Platinum Boarder

GK User
Mon Mar 23, 2015 8:45 am
Yes, exactly.
User avatar
Administrator

GK User
Mon Mar 23, 2015 9:59 am
Thank you Dziukdek.
User avatar
Platinum Boarder


cron