I am busy with building a website for a customer of mine. I want to use multiple menu's. I did everything exactly as I could find in the 'help-section'. The website should look like:
http://img21.imageshack.us/img21/2510/nwesite.jpg
Above, a menu, which is always visible, and on the right a submenu, which is only visible on some pages. I've done exactly as I could find in the 'developers-section', but I see every subpage in the main-menu, and not in the submenu.
What should I do to fix this?
Hi
you should modify the max-level tag in the sm2_menu_call to sm2_START for the menu then only shows the Start-Level.
I think that would do it.
rgds
erpe
where can i find this file i should edit?
The call should be in the index.php in your template
rgds
erpe
can't find it... sorry
What template do you use?
"Simple", to test the multiple menu function, for the final version i'm going to build it as shown in the example in my first post.
As far as I know the "Simple Template" is workin with the old show_menu call.
You could replace it with a sm2 call if you work with a wb 2.7 version (for sm2 is a standard moduel in wb 2.7)
If you create your own template you will use the sm2 in WB 2.7 .
Find all information about show_menu2 here (http://www.websitebakers.com/pages/admin/core-replacements/show_menu2.php)and the links on that page.
Hope it helps.
rgds
erpe
Thanks but... it still doesn't work :@ Could you please show me how to do it ? (I think I've made a mistake..)
Thanks in advance!
index.php
Quote<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title><?php page_title(); ?></title>
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR; ?>/screen.css" media="screen" />
</HEAD>
<BODY>
<center><div id="container"></center>
<div id="header">
<div id="logo-header">
<img src="<?php echo TEMPLATE_DIR; ?>/logo.gif" alt="Alt text" height="180">
</div>
<div id="adres-header">
<?php echo WEBSITE_HEADER; ?>
</div>
</div>
<div id="hoofd-menu">
****
THIS IS WHERE THE MAIN-MENU SHOULD BE
****
</div>
<div id="body-text">
<?php page_content(1); ?>
</div>
<div id="sub-menu">
****
THIS IS WHERE THE SUB-MENU SHOULD BE
****
<br>
<?php page_content(2); ?>
</div>
<div id="content-einde"> </div>
<div id="footer">
<?php page_footer(); ?>
</div>
</div>
</body>
</html>
screen.css
Quotebody {
font: 76%/1.5em "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
background: #86002D;
color: #10253F;
}
#container {
margin-top: 50px;
width: 800px;
background: #FCF6D4;
}
#header {
margin-top: 35px;
margin-bottom: 5px;
width: 100%;
height: 225px;
background: url(header.jpg) no-repeat;
}
#logo-header {
margin-top: 20px;
margin-right: 20px;
float: right;
text-align: right;
}
#adres-header {
text-align: left;
margin-top: 160px;
margin-left: 10px;
font-size: 7pt;
color: #FCF6D4;
}
#hoofd-menu {
margin-top: 0px;
margin-bottom: 15px;
border-color: #86002D;
border-style: solid;
border-width: 1px;
border-left: none;
border-right: none;
border-top: none;
}
#hoofd-menu a, a:link, a:active, a:hover {
color: #86002D;
text-decoration: none;
margin-right: 7px;
margin-left: 7px;
margin-top: 0px;
margin-bottom: 0px;
text-align: center;
}
#sub-menu a, a:link, a:active, a:hover {
color: #86002D;
text-decoration: none;
margin-right: 7px;
margin-left: 7px;
margin-top: 0px;
margin-bottom: 0px;
text-align: center;
}
#hoofd-menu ul {
margin-top: 12px;
margin-bottom: 12px;
padding: 0;
text-align: center;
}
#hoofd-menu li {
list-style: none;
display: inline;
}
#sub-menu {
float: right;
text-align: left;
width: 170px;
margin-top: 45px;
}
#sub-menu ul {
margin-top: 0px;
margin-bottom: 0px;
padding: 0;
text-align: left;
}
#sub-menu li {
list-style: none;
margin-bottom: 5px;
}
#body-text {
float: left;
text-align: left;
width: 600px;
margin-left: 20px;
margin-top: 10px;
margin-right: 10px;
margin-bottom: 0px;
}
#body-text h1, h2, h3, h4, h5, h6 {
color: #86002D;
}
#body-text h1 {
font-size: 160%;
text-decoration: bold;
}
#body-text h2 {
font-size: 140%;
text-decoration: bold;
}
#body-text h3 {
font-size: 120%;
text-decoration: bold;
}
#body-text h4 {
font-size: 110%;
text-decoration: bold;
}
#body-text h5 {
font-size: 100%;
text-decoration: bold;
}
#body-text h6 {
font-size: 90%;
text-decoration: bold;
}
#content-einde {
clear: both;
border-color: #86002D;
border-style: solid;
border-width: 1px;
border-left: none;
border-right: none;
border-top: none;
margin-top: 5px;
margin-bottom: 25px;
margin-left: 0px;
margin-right: 0px;
}
#footer {
text-align: center;
font-size: 7pt;
}
For you don't have multiple menus but a main menu and a sub menu (show all levels below main menu) you call the main menu with
<?php show_menu2(0, SM2_ROOT, SM2_START, SM2_TRIM|SM2_PRETTY);?>
and the submenu with
<?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_TRIM|SM2_PRETTY);?>
Than you have to format the classes by css.
rgds
erpe
Hi Erpe,
Everything worked!! thanks!
My cliens wants to add a menu (disclaimer, etc.) at the bottom of the page: how shoud i do this?
Add the multiple menu option for the main menu+submenu 1 'multiple menu' and for the extra menu an other one?
regards,
duco
Hi Duco,
multiple menus are described at the help pages (http://help.websitebaker.org/pages/en/advanced-docu/designer-guide/multiple-menus.php).
You have to modify your template files, then activate multiple menus in the options. After that you can choose the desired menu in the settings of every page.
The best way to add such extra links is to create a invisible page (named "submenu" or something like that) under which you arrange your pages (or menulinks) that should be shown. The hidden page and all the subpages must have the second menu enabled in their options.
The related show_menu2 call then looks like:
<?php show_menu2(1, SM2_ROOT, SM2_START+1, (SM2_TRIM | SM2_NUMCLASS | SM2_PRETTY)); ?>
regards
Michael
Thanks! I'm gonna try this out asap (schoolwork to do :@)