WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Problem with multiple menu's
  • Print
Pages: [1]   Go Down

Author Topic: Problem with multiple menu's  (Read 7061 times)

Offline D. Peeters

  • Posts: 128
Problem with multiple menu's
« on: March 15, 2009, 11:13:15 AM »
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?
Logged

erpe0812

  • Guest
Re: Problem with multiple menu's
« Reply #1 on: March 15, 2009, 11:21:09 AM »
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
Logged

Offline D. Peeters

  • Posts: 128
Re: Problem with multiple menu's
« Reply #2 on: March 15, 2009, 11:28:53 AM »
where can i find this file i should edit?
Logged

erpe0812

  • Guest
Re: Problem with multiple menu's
« Reply #3 on: March 15, 2009, 11:39:52 AM »
The call should be in the index.php in your template


rgds

erpe
Logged

Offline D. Peeters

  • Posts: 128
Re: Problem with multiple menu's
« Reply #4 on: March 15, 2009, 01:16:46 PM »
can't find it... sorry
Logged

erpe0812

  • Guest
Re: Problem with multiple menu's
« Reply #5 on: March 15, 2009, 01:30:29 PM »
What template do you use?
Logged

Offline D. Peeters

  • Posts: 128
Re: Problem with multiple menu's
« Reply #6 on: March 15, 2009, 06:22:18 PM »
"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.
Logged

erpe0812

  • Guest
Re: Problem with multiple menu's
« Reply #7 on: March 15, 2009, 06:40:28 PM »
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
Logged

Offline D. Peeters

  • Posts: 128
Re: Problem with multiple menu's
« Reply #8 on: March 22, 2009, 11:19:02 AM »
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">&nbsp;</div>

<div id="footer">
<?php page_footer(); ?>
</div>

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



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;
    }

« Last Edit: February 09, 2011, 03:36:45 PM by D. Peeters »
Logged

erpe0812

  • Guest
Re: Problem with multiple menu's
« Reply #9 on: March 22, 2009, 12:07:29 PM »
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: [Select]
<?php    show_menu2(0, SM2_ROOT, SM2_START, SM2_TRIM|SM2_PRETTY);?>
and the submenu with

Code: [Select]
<?php    show_menu2(0, SM2_ROOT+1, SM2_ALL, SM2_TRIM|SM2_PRETTY);?>
Than you have to format the classes by css.

rgds

erpe
Logged

Offline D. Peeters

  • Posts: 128
Re: Problem with multiple menu's
« Reply #10 on: April 14, 2009, 07:55:56 PM »
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
Logged

BlackTiger

  • Guest
Re: Problem with multiple menu's
« Reply #11 on: April 14, 2009, 08:42:26 PM »
Hi Duco,

multiple menus are described at the help pages.

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:

Code: [Select]
<?php show_menu2(1, SM2_ROOT, SM2_START+1, (SM2_TRIM | SM2_NUMCLASS | SM2_PRETTY)); ?>

regards
Michael
Logged

Offline D. Peeters

  • Posts: 128
Re: Problem with multiple menu's
« Reply #12 on: April 14, 2009, 09:03:30 PM »
Thanks! I'm gonna try this out asap (schoolwork to do :@)
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Problem with multiple menu's
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2