Image Logo multilang

May 2014 Joomla Template
GK User
Mon Jul 04, 2016 9:02 am
Hello!
Few years ago I got a nice solution for Crativity template from Teitbite. The solution was quite ellegant and efficient, and it was something like this in block logo.php:
Code: Select all
<h1 class="gkLogo">
        <a href="<?php echo JURI::root(); ?>" id="gkLogo">
           <img src="images/logo_<?php echo $this->APITPL->language; ?>.png" alt="<?php echo $this->API->getPageName(); ?>" />
        </a>
     </h1>

Now I am looking for a similar solution for University, but I can see just one way, by duplicating the template. I'm using Falang for multilingual handling. I don't think that duplicating template is best way cos whenever I change something change something in the template for one language, I must do that again in template copy.
Is there a similar (elegant :-) ) way to get the multilang logo in University?
Thank you.
User avatar
Senior Boarder

teitbite
Thu Jul 07, 2016 12:10 pm
Hi

If I'm not mistaken only the naming has changed. Try with this code:

Code: Select all
<h1 class="gkLogo">
    <a href="<?php echo JURI::root(); ?>" id="gkLogo">
        <img src="images/logo_<?php echo $this->AP->language; ?>.png" alt="<?php echo $this->API->getPageName(); ?>" />
    </a>
</h1>
User avatar
Moderator

GK User
Fri Jul 15, 2016 3:53 pm
Teitbite, sorry. This time it didn't work... Any other idea?
User avatar
Senior Boarder

teitbite
Tue Jul 19, 2016 6:51 pm
Hi

OMG. I think I've made a typo in the most important part :(

Code: Select all
<h1 class="gkLogo">
    <a href="<?php echo JURI::root(); ?>" id="gkLogo">
        <img src="images/logo_<?php echo $this->API->language; ?>.png" alt="<?php echo $this->API->getPageName(); ?>" />
    </a>
</h1>


should be API, not AP. Sorry for that.
User avatar
Moderator

GK User
Wed Apr 19, 2017 9:46 pm
And where to add this code?
at index.php?
User avatar
Fresh Boarder

teitbite
Thu Apr 20, 2017 1:24 pm
Hi

It's in file /layout/blocks/logo.php
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.