module position for language switcher

Joomla webshop template with CSS3-based animations, VirtueMart support and one-page checkout.
GK User
Wed Mar 09, 2016 11:58 am
Hi
I need a moduleposition for the language selector right of the mainmenu.
In template.xml is a lang position but theres no effect if i publish it there. Where can i publish the language selector allign right with the menu?

http://www.christophzihlmann.com

thx 4 help
User avatar
Expert Boarder

GK User
Thu Mar 10, 2016 9:27 am
Hi i add a new modul position for language switcher. Where i have to add in default.php, that it appears in the menubar.
User avatar
Expert Boarder

GK User
Fri Mar 11, 2016 10:50 am
Hello? Is There Anybody Out There?
User avatar
Expert Boarder

teitbite
Mon Mar 14, 2016 5:06 pm
Hi

Please take a look at this article: https://www.gavick.com/documentation/jo ... her-module

Try to add this position before or after code for menu:

Code: Select all
                 <?php if($this->API->get('show_menu', 1)) : ?>
                 <div id="gkMainMenu" <?php echo $this->API->get('menu_type', 'classic') == 'overlay' ? 'class="gkMenuOverlay"' : 'class="gkMenuClassic"'; ?>>
                         <?php
                       $this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
                        $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
                    ?>
                 </div>
                 <?php endif; ?>
User avatar
Moderator

GK User
Wed Mar 16, 2016 2:01 pm
Hi thx 4 replay
I add the position once before and once after the menu , but it wont show up on the site.


<?php if($this->API->modules('langswitch')) : ?>
<div class="langswitch">
<jdoc:include type="modules" name="langswitch"
style="<?php echo $this->module_styles['langswitch']; ?>" />
</div>
<?php endif; ?>

<?php if($this->API->get('show_menu', 1)) : ?>
<div id="gkMainMenu" <?php echo $this->API->get('menu_type', 'classic') == 'overlay' ? 'class="gkMenuOverlay"' : 'class="gkMenuClassic"'; ?>>
<?php
$this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
$this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
?>
</div>
<?php endif; ?>

______________


<div id="gkHeaderNav">
<div class="gkPage">
<?php $this->layout->loadBlock('logo'); ?>

<?php if($this->API->get('show_menu', 1)) : ?>
<div id="gkMainMenu" <?php echo $this->API->get('menu_type', 'classic') == 'overlay' ? 'class="gkMenuOverlay"' : 'class="gkMenuClassic"'; ?>>
<?php
$this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
$this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
?>
</div>
<?php endif; ?>
<?php if($this->API->modules('langswitch')) : ?>
<div class="langswitch">
<jdoc:include type="modules" name="langswitch"
style="<?php echo $this->module_styles['langswitch']; ?>" />
</div>
<?php endif; ?>

what im doing wrong

thx 4 help
User avatar
Expert Boarder

teitbite
Mon Mar 21, 2016 2:56 pm
Hi

Please publish module in "langswitch" module position. Code looks ok, so I believe it's there, but most probably is pushed by menu to place outside of the visible area.
User avatar
Moderator

GK User
Mon Mar 21, 2016 3:14 pm
if a publish it in langswitch position it disapears, it apears in breadcrumbs only and that does't looks very nice.
Is there any css what i can add to align with the menu?
thx
User avatar
Expert Boarder

teitbite
Fri Mar 25, 2016 11:55 am
Hi

Please publish language module in "langswitch" module position You created. Leave the one in breadcrumbs if You need it. I just want to see the code after this module is used there and help to make it visible.
User avatar
Moderator

GK User
Mon Mar 28, 2016 10:42 am
Hi
thx for reply.
I published a copy in langswitch position.

thx 4 help
User avatar
Expert Boarder

teitbite
Sat Apr 02, 2016 2:27 pm
Hi

Ok. Now I was able to see what is the problem. Your code is displayed as the code, means it's being treated as text not an actuall code. It's most likely because of Your editor.

Was this code in /layout/default.php ? Please send me this file, so I'll correct it.
User avatar
Moderator

teitbite
Mon Apr 11, 2016 5:24 pm
Hi

Sorry for delay. Your mail got to spam and I've just found it. Problem was trivial, You had the code:

Code: Select all
             <jdoc:include type="modules" name="langswitch"
             style="<?php echo $this->module_styles['langswitch']; ?>" />


while it should be

Code: Select all
<jdoc:include type="modules" name="langswitch" style="<?php echo $this->module_styles['langswitch']; ?>" />


A fix file is attached.
User avatar
Moderator

GK User
Tue Apr 12, 2016 8:07 am
it works, thx a lot
User avatar
Expert Boarder

teitbite
Sat Apr 16, 2016 7:05 pm
Hi
Glad I could help.
---
If You were satisfied with our support please let other users know on Twitter: http://twitter.com/gavickpro or Facebook: http://www.facebook.com/gavickpro
User avatar
Moderator


cron