WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Need some help with the show_menu function call for multilingual site
(1/1)
Fredflintstone:
Hi,
Im making a multilingual site and i got the menus sorted out without any problem.
However, i want to show the extra menu with flags to select another language from every page.
I know you have to add ann additional menu in the index.php of your template but if i copy the given code (from the multi lingual tutorial) i get the code instead of the menu in my site.
Can anyone help me?
This is the code as in the multi lingual tutorial;
--- Code: ---show_menu(1, 0, 1, true, "[a]<img src=" .WB_URL .
"/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0);
--- End code ---
And this is the code of my index.php of my template;
--- Code: ---<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title><?php 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(); ?>" />
<meta name="generator" content="Microsoft FrontPage 6.0">
<link href="<?php echo TEMPLATE_DIR; ?>/style.css" rel="stylesheet" type="text/css" media="screen" />
<?php if(function_exists('register_frontend_modfiles')) { register_frontend_modfiles('css'); } ?>
</head>
<body>
<div id="container">
<div id="kopf">
</div>
<div id="navi">
<h2><?php echo $TEXT['MENU']; ?></h2>
<?php if(SHOW_MENU) { /* Only shown menu if we need to */ ?>
<?php show_menu(1, 1); ?>
<?php } ?>
<h2>Portfolio</h2>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID=Showcase_3 WIDTH=175 HEIGHT=170>
<PARAM NAME=movie VALUE="/wb/Showcase_3.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=true>
<EMBED src="/wb/Showcase_3.swf" loop=true quality=high
WIDTH=175 HEIGHT=170 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
<?php if(SHOW_SEARCH) { /* Only show search box if search is enabled */ ?>
<h2><?php echo $TEXT['SEARCH']; ?></h2>
<form name="search" action="<?php echo WB_URL; ?>/search/index<?php echo PAGE_EXTENSION; ?>" method="post">
<input type="text" name="string" /><br /><br />
<input type="submit" name="submit" value="<?php echo $TEXT['SEARCHING']; ?>" />
</form>
<?php } ?>
<br />
<?php if(FRONTEND_LOGIN AND !$wb->is_authenticated()) { ?>
<h2><?php echo $TEXT['LOGIN']; ?></h2>
<form name="login" action="<?php echo LOGIN_URL; ?>" method="post">
<?php echo $TEXT['USERNAME']; ?>:
<input type="text" name="username" />
<?php echo $TEXT['PASSWORD']; ?>:
<input type="password" name="password" /><br /><br />
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" /><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 AND $wb->is_authenticated()) { ?>
<h2><?php echo $TEXT['LOGGED_IN']; ?></h2>
<form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post">
<?php echo $TEXT['WELCOME_BACK']; ?>,<br /> <a href="<?php echo PREFERENCES_URL; ?>">
<?php echo $wb->get_display_name(); ?></a><br /><br />
<input type="submit" name="submit" value="<?php echo $MENU['LOGOUT']; ?>" />
</form>
<?php } ?>
</div>
<hr />
<div id="inhalt">
<h3><?php page_title('','[PAGE_TITLE]'); ?></h3>
<div class="storycontent">
<br/><?php page_content(); ?>
</div>
</div>
<div id="footer">
<p>Powered by <a href="http://www.WebsiteBaker.org/" target="_blank">WebsiteBaker</a> - © <?php page_title('','[WEBSITE_TITLE]'); ?></p>
</div>
</div>
</html>
--- End code ---
Can anyone insert the right code into the right place for me ?
Thank you
Edwin
naturalp:
Did you get a reply from anyone re this as I think I will be going down the same route soon and would love to know..?
BerndJM:
Hi,
think the code-example in the tutorial is a little buggy.
Give this a try:
--- Code: ---show_menu(1, 0, 1, true, '[a]<img src="' .WB_URL .'/media/flags/[menu_title].gif" />[/a]', '', '', '', false, '', 0);
--- End code ---
Be aware of the ' and "
Regards Bernd
Navigation
[0] Message Index
Go to full version