-
AuthorPosts
-
peters256 Friend
peters256
- Join date:
- January 2010
- Posts:
- 20
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
March 16, 2010 at 4:22 pm #149573Hello,
I have a web site in 2 languages: french & english
And the deal is to change the image logo when the languages change.The template is loaded in the component.php :
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/ja_teline_iii/css/addons.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/ja_teline_iii/css/template.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/ja_teline_iii/css/print.css" type="text/css" />
</head>So I copy the file “template.css” and rename like this
the original template : en-gb.css
the copy template : fr-fr.css (in this template I change the link to the logo image)And of course I change the line code in component.php :
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/<?php echo $this->language ?>.css" type="text/css" />
But now the web site doesn’t find any template.
And if I leave the current template in place, and I let my modified code, it works.
So I don’t understand…if anyone have a idea ??
Where is the template loaded ?Thanks in advance.
Peters
gray Friendgray
- Join date:
- October 2009
- Posts:
- 957
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 28
- Thanked:
- 292 times in 230 posts
March 16, 2010 at 4:40 pm #336458This code form header.php displays the logo
[php]
<h1 class=”logo”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
[/php]To my mind it’s not necessry to make 2 CSS files, but to create separate class style for <a>, like logo-fr-fr and logo-en-us and difine it in tesmplate.css.
[php]
<h1 class=”logo-<?php echo $this->language ?>”>
<a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
</h1>
[/php]1 user says Thank You to gray for this useful post
peters256 Friendpeters256
- Join date:
- January 2010
- Posts:
- 20
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
March 16, 2010 at 8:08 pm #336480Hello,
thanks you very much for this great idea.
It works very well.Just 2 things to do :
1 : change the header.php like you say.2 : change the template.css; but attention you need to change 3 things
h1.logo (in /*header*/)
h1.logo a (in /*logo image*/)
h1.logo a span (in /*logo image*/)For my case (fr-fr and en-gb), my code is this :
/* HEADER
--------------------------------------------------------- */
#ja-header { z-index: 10; position: relative; }#ja-header .main { padding: 30px 0 10px; }
h1.logo, div.logo-text h1 {
font-size: 300%;
line-height: 1;
}h1.logo, div.logo-text { float: left; }
h1.logo-fr-fr { float: left; }
h1.logo-en-gb { float: left; }
/* Logo Image ---*/
h1.logo {
width: 265px;
height: 62px;
margin: 0;
}h1.logo-fr-fr a {
width: 429px;
height: 62px;
display: block;
background: url(../images/logo-fr.gif) no-repeat left;
}h1.logo-fr-fr a span {
position: absolute;
top: -1000px;
}h1.logo-en-gb a {
width: 429px;
height: 62px;
display: block;
background: url(../images/logo-en.gif) no-repeat left;
}h1.logo-en-gb a span {
position: absolute;
top: -1000px;
}Thanks again.
Peters1 user says Thank You to peters256 for this useful post
peters256 Friendpeters256
- Join date:
- January 2010
- Posts:
- 20
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
March 16, 2010 at 8:27 pm #336481and I see that the search button disappear when I change the language ….
any idea of this problem ?
peters256 Friendpeters256
- Join date:
- January 2010
- Posts:
- 20
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 9
- Thanked:
- 1 times in 1 posts
March 16, 2010 at 8:43 pm #336488Oups, sorry.
I published the joomfish module on “Search button : No”
Everything is ok now : “Search button : Yes”
March 20, 2010 at 9:01 am #336989Hi
I’m in the same situation as you, but unless I’m uncomfortable with the php code, can better explain to me. for example to color in parts modifer.Cela to make me a great service.See you.
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by kha007 14 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum