WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Problem with multiple menu's
erpe0812:
What template do you use?
D. Peeters:
"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.
erpe0812:
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 and the links on that page.
Hope it helps.
rgds
erpe
D. Peeters:
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>
--- End quote ---
screen.css
--- Quote ---body {
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;
}
--- End quote ---
erpe0812:
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
--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_START, SM2_TRIM|SM2_PRETTY);?>
--- End code ---
and the submenu with
--- Code: ---<?php show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_TRIM|SM2_PRETTY);?>
--- End code ---
Than you have to format the classes by css.
rgds
erpe
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version