WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Multilanguage possible on templates with show_menu2 #SOLVED#
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 :-)
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:
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]
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:
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:
--- Code: ---<?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(1, 0, 1, true, "[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(1, 1); ?>
<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>
--- End code ---
My question is: Here I did something wrong, but can you see what I did wrong exactly?
Navigation
[0] Message Index
[#] Next page
Go to full version