- Posts: 14116
- Thank you received: 1639
Multiple language wrong site layout
-
nivong
- Topic Author
- Visitor
10 years 7 months ago - 10 years 7 months ago #39222
by nivong
Multiple language wrong site layout was created by nivong
When switching to multiple languages the home page isn't recognized anymore and gets the sparky_inner assigned to the body tag.
How can I change this back to sparky_home to have the transparent menu bar?
www.dronevlieger.nl/nl/
www.dronevlieger.nl/en/
How can I change this back to sparky_home to have the transparent menu bar?
www.dronevlieger.nl/nl/
www.dronevlieger.nl/en/
Last edit: 10 years 7 months ago by nivong.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
10 years 7 months ago #39229
by ivan.milic
Replied by ivan.milic on topic Multiple language wrong site layout
Open index.php of template
change :
<?php $menu = JSite::getMenu(); ?>
<body<?php if ($menu->getActive() == $menu->getDefault()) { echo ' class="sparky_home"'; }else{ echo ' class="sparky_inner"'; } ?>>
to:
<?php $menu = JSite::getMenu();
$lang = JFactory::getLanguage();
?>
<body<?php if ($menu->getActive() == $menu->getDefault($lang->getTag())) { echo ' class="sparky_home"'; }else{ echo ' class="sparky_inner"'; } ?>>
change :
<?php $menu = JSite::getMenu(); ?>
<body<?php if ($menu->getActive() == $menu->getDefault()) { echo ' class="sparky_home"'; }else{ echo ' class="sparky_inner"'; } ?>>
to:
<?php $menu = JSite::getMenu();
$lang = JFactory::getLanguage();
?>
<body<?php if ($menu->getActive() == $menu->getDefault($lang->getTag())) { echo ' class="sparky_home"'; }else{ echo ' class="sparky_inner"'; } ?>>
The following user(s) said Thank You: nivong
Please Log in to join the conversation.
-
nivong
- Topic Author
- Visitor
10 years 7 months ago - 10 years 7 months ago #39234
by nivong
Replied by nivong on topic Multiple language wrong site layout
That did work thanks a lot!
Last edit: 10 years 7 months ago by nivong.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 7 months ago #39261
by ivan.milic
Replied by ivan.milic on topic Multiple language wrong site layout
Open index.php of template, enchant <body> tag as this:
<?php $menu = JSite::getMenu();
$lang = JFactory::getLanguage();
?>
<body<?php if ($menu->getActive() == $menu->getDefault($lang->getTag())) { echo ' class="home"'; }else{ echo ' class="inner"'; } ?>>
then in template_css.css add this css:
.home .topmenu_wrap{
display:none;
}
<?php $menu = JSite::getMenu();
$lang = JFactory::getLanguage();
?>
<body<?php if ($menu->getActive() == $menu->getDefault($lang->getTag())) { echo ' class="home"'; }else{ echo ' class="inner"'; } ?>>
then in template_css.css add this css:
.home .topmenu_wrap{
display:none;
}
Please Log in to join the conversation.
Time to create page: 0.173 seconds