Multilanguage possible on templates with show_menu2 #SOLVED#

babsy

hi.... Could i see a link to this page you made (because i think i have almost the same problem)
im making a page with the flags and with a drop down menu (generic template) - the flags works fine and the dropdown menu - UNTIL i try to hide the DK/UK top pages!! then it goes wrong, either i can get the drop down to work with the UK/DK as main pages - or i can hide the UK/DK pages, but then the drop down won´t work...
so im a bit lost here.... here is my code in the menu (its from generic template):

<div id="navigation">
       <?php if(SHOW_MENU2) { /* Only shown menu if we need to */ ?>    
       <?php pmenu(1,0,-1,false,'<li[locator][class]>[a][menu_title][/a]','</li>','<ul id="menu">','</ul>','',' class="sel"'); ?>
       <?php } ?>
<!--<ul>
<li class="selected"><a href="#">First page</a></li>
<li><a href="#">Second</a></li>
<li><a href="#">Third</a></li>
<li><a href="#">Fourth</a></li>
<li><a href="#">Fifth</a></li>
<li><a href="#">And the last one</a></li>
</ul>-->
</div>


Boudi

Finally....I did it :)

I solved the multilanguage ALLCSS2 pulldownmenu which is compatible with Firefox too :)
With help from Matthias & Christian, thnQ.

flag code:

<?php show_menu2(0SM2_ROOTSM2_STARTtrue"[a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif border=0 />[/a]"''''''false''0); ?>

menu code:

<?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_ALL|SM2_CURRTREEfalse"\n</li>"falsefalsefalse'<ul id="header_menu" class="menu">'); ?>
...:: Bake the Unbakable ::...

Boudi

Hello Matthias and Christian,

Thank you for taking the time to help me out. I really appreciate it.

I read your tips en suggestion links. This made more things clear to me which i tried to use on the code. But may be the ALLCSS2 template is kinda rough for multilanguage, I don't know.  :oops:

But now I'm lost. After several days of reading, trying, logical thinking etcetera I'm stucked.

I use the ALLCSS2 template. The flag menu does work well now (at least, this code gives me a proper result):

<?php show_menu2(0SM2_ROOTSM2_STARTtrue"[a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif border=0 />[/a]"''''''false''0); ?>

But I'm totally stucked on the menu. Or I see the whole menu (with containers) or I see nothing  :cry:

<?php show_menu2(0SM2_ROOTSM2_ALLSM2_ALLfalse"\n</li>"falsefalsefalse'<ul id="header_menu" class="menu">'); ?>

As far I can think logically after all those testing and reading I did the best I can but it didn't help me out.

Can you please explain to me what I messed up on this code?  :oops:

...:: Bake the Unbakable ::...

doc

Hello knert,

please have a look at http://help.websitebaker.org/pages/en/advanced-docu/designer-guide/multiple-menus.php which explains the differences between calling the menu function twice (which is what you are after) and to have two differnt menus.

Regards Christian

ruebenwurzel

Hello,

no, you cannot do this with one menu call. But you can call show_menu2 multiple times. One for only show the flages and one for the menu itself and even a third or fourth call for spezial menu wich could be the same pages in every languages.

Using show_menu2 for all needed menus means, the whole menu tree is created only once and is displayed in different ways only with the setting off different parameters.

Matthias

Boudi

Hello Matthias,

So you mean that I can merge the flag-choise menu and allcss2 menu together in 1 show_menu2 ?  :?
...:: Bake the Unbakable ::...

ruebenwurzel

Hello,

i saw you mixes show_menu with show_menu2. I would recommand to only use show_menu2. This way the menu only needs to be created one time and not twice and i think with the right parameters it also solves your question.

Matthias

Boudi

Hello Kweitzel,

ThnQ. I checked the examples!

After a few hours of trying all the steps I am a few steps closer now.

My basic template will be ALLCSS2. I managed it to let the flags do his job.

The ONLY issue that I cannot solve is that I cannot hide the container pages without hiding the childpages too.

So my question is: How can I hide the containers but show the menu that's underneath the containers.

These are my 2 show_menu's:

<?php show_menu(101true"[a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif border=0 />[/a]"''''''false''0); ?>
<?php show_menu2(001SM2_ROOT+2false"\n</li>"falsefalsefalse'<ul id="header_menu" class="menu">'); ?><br />

...:: Bake the Unbakable ::...

kweitzel

Have a look again at your menucode ... and compare it to to the demo of show_menu2: http://code.jellycan.com/sm2test/

Have a special look at the section "First Level" and "Second Level".

cheers

Klaus

Boudi

Hello Doc,

ThnQ for your answer. Again I did all the steps as mentioned in the helppage but I am still stucked. For 100% sure I have the first 2 steps correct. I think the problem is the show_menu function.

I tried it on the Micromedia_new template but no luck. (http://addons.WebsiteBaker.org/pages/lorem-ipsum.php?template=micromedia_new)

Here's the (undoubtedly) wrong index.php with the edited show_menu codes:


<?php

/*

 WebsiteBaker Project <http://www.WebsiteBaker.org/>
 Copyright (C) 2004-2006, Ryan Djurovich

 WebsiteBaker is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 WebsiteBaker is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with WebsiteBaker; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php echo WEBSITE_TITLE?> - <?php echo PAGE_TITLE?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link href="<?php echo TEMPLATE_DIR?>/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo TEMPLATE_DIR?>/print.css" rel="stylesheet" type="text/css" media="print" />
</head>
<body>

<div class="main">

   <div class="banner">
       <div class="site_name"><?php echo WEBSITE_TITLE?></div>
       <div class="utility"><a href="#">Utility Link</a> | <a href="#">Utility Link</a> | <a href="#">Utility Link</a></div>
       <div class="top_menu">
           <img alt="" src="<?php echo TEMPLATE_DIR?>/images/gblnav_left.gif" height="32" width="4" class="top_menu_left"> <img alt="glbnav_right.gif" src="<?php echo TEMPLATE_DIR?>/images/glbnav_right.gif" height="32" width="4" class="top_menu_right">
           <div class="top_menu_links"><?php show_menu2(101true"[a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif />[/a]"''''''false''0); ?>

           </div>
           <!--end top_menu_links-->
           <div class="search_box">
               <?php if(SHOW_SEARCH == true) { ?>
               <form name="search" action="<?php echo WB_URL.'/search/index'.PAGE_EXTENSION?>" method="post">
               <input name="string" type="text" class="search_string" size="15" />
               <input type="submit" name="submit" value="Search" class="search_submit" />
               </form>
               <?php ?>
           </div>
       </div>
       <!-- end top_menu -->
   </div>
   <!-- end banner -->

   <div class="box">
       <img alt="" src="<?php echo TEMPLATE_DIR?>/images/tl_curve_white.gif" height="6" width="6" class="corner_left"> <img alt="" src="<?php echo TEMPLATE_DIR?>/images/tr_curve_white.gif" height="6" width="6" class="corner_right">
       <div class="breadcrumb">
           <?php show_breadcrumbs(); ?>
       </div>
       <div class="page_name">
           <h2><?php echo PAGE_TITLE?></h2>
       </div>
           <div class="menu">
                           <?php show_menu2(11); ?>
               <div class="login_box">
               <?php
                
if(FRONTEND_LOGIN == 'enabled' AND VISIBILITY != 'private' AND $admin->get_session('USER_ID') == '') {
                    
?>

                   <form name="login" action="<?php echo LOGIN_URL?>" method="post" class="login_table">
                   <h1><?php echo $TEXT['LOGIN']; ?></h1>
                   <?php echo $TEXT['USERNAME']; ?>:
                   <input type="text" name="username" style="text-transform: lowercase;" /><br>
                   <?php echo $TEXT['PASSWORD']; ?>:
                   <input type="password" name="password" /><br>
                   <input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" style="margin-top: 3px; text-transform: uppercase;" /><br>
                   <a href="<?php echo FORGOT_URL?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a>
                   <?php if(is_numeric(FRONTEND_SIGNUP)) { ?>
                   <a href="<?php echo SIGNUP_URL?>"><?php echo $TEXT['SIGNUP']; ?></a>
                   <?php ?>
                   </form>
                   <?php
                
} elseif(FRONTEND_LOGIN == 'enabled' AND is_numeric($admin->get_session('USER_ID'))) {
                    
?>

                   <form name="logout" action="<?php echo LOGOUT_URL?>" method="post" class="login_table">
                   <h1><?php echo $TEXT['LOGGED_IN']; ?></h1>
                   <?php echo $TEXT['WELCOME_BACK']; ?>, <?php echo $admin->get_display_name(); ?>
                   <br>
                   <input type="submit" name="submit" value="<?php echo $MENU['LOGOUT']; ?>" />
                   <br>
                   <a href="<?php echo PREFERENCES_URL?>"><?php echo $MENU['PREFERENCES']; ?></a>
                   <a href="<?php echo ADMIN_URL?>/"><?php echo $TEXT['ADMINISTRATION']; ?></a>
                   </form>
                   <?php
                
}
                
?>

           </div>
       </div>
       <div class="content">
           <?php page_content(); ?>
       </div>
       <!--end content -->
       <div class="footer">
           <?php page_footer(); ?>
           <div class="powered_by">
               Powered by <a href="http://www.WebsiteBaker.org" target="_blank">WebsiteBaker</a>
           </div> 
       </div>
   </div>
   <!--end box-->

</div>
</body>
</html>


My question is: Here I did something wrong, but can you see what I did wrong exactly?
...:: Bake the Unbakable ::...

doc

Hello,

you have to use two menu calls in your template, one for the flags, one for the menus. If you have followed the example on the help site, the flags are created from the container pages only (e.g. DE, EN, XX). In other words, for flags do only show the root level. The pages menu starts one level below the root.

Regards Christian

Boudi

Thank you for the link :)

For the last 2 days I have only one problem left: When integrating the flags into the website, the menu itself turns into images too! (see attachment)

Undoubtedly this is an error from me. But I didn't found how to solve this.

Is anyone familiar with this problem and knows a solution?

[gelöscht durch Administrator]
...:: Bake the Unbakable ::...

doc

Hello,

well the docu you are referring to is outdated, maybe you give it a try with the last docu available which can be found at:
http://help.websitebaker.org/pages/en/advanced-docu/designer-guide/multilingual-websites.php

Regards Christian

Boudi

Hi there,

With ease I managed to set up the multilanguage website with the standard 'round' template.
( http://projects.WebsiteBaker.org/websitebaker2/wiki/Docs-EN-Multilingual-Website )

Now i want to use the multilanguage setup into templates with the show_menu2 (eg: ALLCSS 2 template)

The problem that I'm facing is that in step 3 of the above link you have to replace the <?php page_menu(); ?>
with another script in order to let the multilanguage script to work.

This piece of code is nowhere to find in another templates. I searched the forum but I could not find any answer to this question:

How can I create a multilanguage website with a template with the show_menu2 in it? (eg ALLCSS 2)

Hope for an answer  :-)



...:: Bake the Unbakable ::...