Shape 5

Joomla Templates => Corpway - Club => : TomJansen April 16, 2018, 02:27:56 AM



: Change logo for a different language
: TomJansen April 16, 2018, 02:27:56 AM
Hi Guys, goodmorning,

I want to change the logo/header when a visitor from a other country visits my website, how is this possible?

The code in the template index.php file is:
:
<!-- Header -->			
<div id="s5_header_area1">
<div id="s5_header_area2">
<div id="s5_header_area_inner">
<div id="s5_header_wrap">

<?php if($s5_pos_logo == "published") { ?>
<div id="s5_logo_module">
<?php s5_module_call('logo','notitle'); ?>
</div>
<?php } else { ?>
<img alt="logo" src="/images/header.jpg" id="s5_logo" onclick="window.document.location.href='<?php echo $LiveSiteUrl ?>'" width="1800"/>
<?php ?>

<?php if ($s5_rss  != "" || $s5_twitter  != "" || $s5_facebook  != "" || $s5_google  != "" || $s5_pinterest  != "") { ?>

I want to change the header.jpg image to header-de.jpg when a German visitor is on our website.

Kind regards!


: Re: Change logo for a different language
: mikek April 16, 2018, 08:36:47 AM
Hello,

You should not be making modifications to the template's index.php file. If you want a different logo per language you would have to use a module published to the "logo" position and set the logo type under Main/Logo. Once you do that you would have to create a module published to "logo" for every language of your site.


: Re: Change logo for a different language
: TomJansen April 16, 2018, 08:49:31 AM
Great! It works perfect, thanks for your fast reply! 8)