[SOLVED] Joomfish logo change solution
Professional Jomal template designed to be easily adaptable to all kinds of business
- GK User
- Sun Nov 06, 2011 2:40 am
Ok so I know alot of people, including myself have had some trouble with getting their logo to change with the language using joomfish.
I have a solution that hopefully can work for everyone.
Firstly I must say that I am using 'corporate 2' template and joomla 1.5 but hopefully it can be applied to other templates too... So here goes.
In no specific order:
I created an English and French logo which I named en-GB.png and fr-FR.png (these can be anything as long as it is reflected in your Template.css changes.
I duplicated the logo section of my template.css file, as below
Obviously changing my second logo class to "logo2". I just copied the whole section to ensure consistency between logo classes.
Then in 'mainnav.php' I found the following code:
And changed it to:
Perhaps there is a better way but this is the best I could piece together for now... I am open to any suggestions anyone may have.
I hope this helps anyone that is also struggling with the same problem and I would love to know if it works for you too.
Thanks for reading.
I have a solution that hopefully can work for everyone.
Firstly I must say that I am using 'corporate 2' template and joomla 1.5 but hopefully it can be applied to other templates too... So here goes.
In no specific order:
I created an English and French logo which I named en-GB.png and fr-FR.png (these can be anything as long as it is reflected in your Template.css changes.
I duplicated the logo section of my template.css file, as below
- Code: Select all
/* logo styling */
h1.logo,
div.logo-text { float:left; padding:0 10px 0 0; background:#f4f2ef; }
h1.logo { width:150px; height:40px; background:#f4f2ef url('../images/en-GB.png') no-repeat 0 0; padding:0; }
h1.logo>a { text-indent:-999em; display:block;width:150px;height:100%; }
div.logo-text h1 { font-size:18px; line-height:26px; height:26px; color:#6b6459; text-transform:uppercase; }
div.logo-text h1 a { color:#6b6459; }
div.logo-text h1 a:hover { text-decoration:none; }
div.logo-text p { font-size:11px; line-height:14px; height:14px; color:#6b6459; text-transform:uppercase; letter-spacing:0.65px; }
/* if you've change logo size - please change also below dimensions */
.gk-nav { margin-left:160px; }
/* logo2 styling */
h1.logo2,
div.logo2-text { float:left; padding:0 10px 0 0; background:#f4f2ef; }
h1.logo2 { width:150px; height:40px; background:#f4f2ef url('../images/fr-FR.png') no-repeat 0 0; padding:0; }
h1.logo2>a { text-indent:-999em; display:block;width:150px;height:100%; }
div.logo2-text h1 { font-size:18px; line-height:26px; height:26px; color:#6b6459; text-transform:uppercase; }
div.logo2-text h1 a { color:#6b6459; }
div.logo2-text h1 a:hover { text-decoration:none; }
div.logo2-text p { font-size:11px; line-height:14px; height:14px; color:#6b6459; text-transform:uppercase; letter-spacing:0.65px; }
/* if you've change logo size - please change also below dimensions */
.gk-nav { margin-left:160px; }
Obviously changing my second logo class to "logo2". I just copied the whole section to ensure consistency between logo classes.
Then in 'mainnav.php' I found the following code:
- Code: Select all
<h1 class="logo">
And changed it to:
- Code: Select all
<?php
$lang =& JFactory::getLanguage();
if($lang->getTag() == 'en-GB'): ?>
<h1 class="logo">
<?php else: ?>
<h1 class="logo2">
<?php endif; ?>
Perhaps there is a better way but this is the best I could piece together for now... I am open to any suggestions anyone may have.
I hope this helps anyone that is also struggling with the same problem and I would love to know if it works for you too.
Thanks for reading.
-
- Senior Boarder
- GK User
- Sun Nov 06, 2011 3:21 am
Thanks for the solution and I am sure there are users who would be happy to see this as there were few requests already in forums.
Just for info I believe this is for joomla 1.5 version of the template.
Just for info I believe this is for joomla 1.5 version of the template.
-
- Platinum Boarder
- GK User
- Thu Aug 01, 2013 8:49 am
normanUK wrote:Thanks for the solution and I am sure there are users who would be happy to see this as there were few requests already in forums.
Just for info I believe this is for joomla 1.5 version of the template.
for more language i Use your solution
<?php
$lang =& JFactory::getLanguage();
if($lang->getTag() == 'it-IT'): ?>
<h1 class="logo">
<?php else: ?>
<?php if($lang->getTag() == 'fr-FR'): ?>
<h1 class="logo1">
<?php else: ?>
<?php if($lang->getTag() == 'en-GB'): ?>
<h1 class="logo2">
<?php else: ?>
<?php if($lang->getTag() == 'es-ES'): ?>
<h1 class="logo3">
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
-
- Fresh Boarder
3 posts
• Page 1 of 1