WebsiteBaker Support (2.8.x) > Templates, Menus & Design

(Solved) Flags for Language switching

(1/1)

Yumi:
I followed the help page on language switching. Using the generic template, I inserted

--- Code: ---show_menu(1, 0, 1, true, "[a]<img src=" .WB_URL .
  "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);
--- End code ---
into the index.php file. And it worked straight out of the box.

However, the flags are shown above the header. How can I get them to display within the header area. Must be a little code for the .css file.

Michael

kweitzel:
The positioning is a mixture of where whinin the sourcecode of the template the menucall is positioned and css. The source positioning defines the container where the menu is shown. The CSS defines how it is shown.

cheers

Klaus

Yumi:
Thanks for the advice. I tried it an succeeded to some extend.

When I put that code into the header section like this:

--- Code: ---div id="header">
<h1><a href="<?php echo WB_URL ?>"><?php page_title(&#39;&#39;, &#39;[WEBSITE_TITLE]&#39;); ?></a></h1>
<h2>This is our homepage</h2>
show_menu(1, 1, 1, true, "[a]<img src=" .WB_URL .
  "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);
</div>
--- End code ---
Then it displays at the right place, but not flags but like this:
"show_menu(1, 1, 1, true, "[a][/a]", '', '', '', false, '', 0); "

Michael

Yumi:
I experimented with kweitzels advice  and some searching and here is my solution (bolt text is my addition):

Template generic, index.php


--- Code: ---<div id="header">
<h1><a href="<?php echo WB_URL ?>"><?php page_title(&#39;&#39;, &#39;[WEBSITE_TITLE]&#39;); ?></a></h1>
<h2>Zusammen meistern wir jede Situation</h2>
[b]<h3><a href="http://www.ot-exit.com/en"><img src="/media/flags/English.gif" alt="English" /img></a></h3>[/b]
</div>
--- End code ---

Template generic, screen.css


--- Code: ---[b]#header h3{
position: relative; bottom: 65px; left: 700px;
}[/b]
--- End code ---

This displays a image called English.gif in folder /media/flags within the top-right header area. To keep languages separate I have two installations of WebsiteBaker. German in / and one in /en . The line links to the English language site when the little flag image is clicked.
Looks really good and thanks for the help.

Michael

Navigation

[0] Message Index

Go to full version