WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Menu Problems- Multiple Menu and child pages!

(1/2) > >>

lorddonk:
Hi, I've just started using WebsiteBaker! I just picked up version 2.7 after trying a bunch of CMS and it is definitely the best there is! I LOVE how easy it is to make a template, and that leads me to this issue I'm having... I really hope someone can help!

I am trying to set up a site with this hiearchy, but I'm having some problems getting the menus to work:


--- Code: ----Home
-About
- - - - - - Terms
- - - - - - Privacy
-Games
- - - - - - Game 1
- - - - - - Game 2
-Community

--- End code ---

etc. As in I have 4 main pages, that each contain "child" pages.

Well, what I WANT to do is have a Main Menu at the top, under the logo, that displays the 'Home' 'About' 'Games' and 'Community' links. I've got this to work right, using the following php in my template:

--- Code: ---<?php show_menu(1); ?>
--- End code ---

Now, I want to have the child pages appear so that when you are on the "Games" page, it will display the child pages "Game 1" and "Game 2" as links in the side navigation bar. I have used the following:

--- Code: ---<?php show_menu(2); ?>
--- End code ---

The problem is, that the links appear in the Top Links menu instead and I'm totally lost as to why! I have enabled the multiple menus option in Advanced Settings, and I already have the first 4 pages set up to display in the "main navigation" and the child pages to appear in the "side navigation".

I have all the pages set up in the correct heirachy, but it just won't work. I hope someone can help me out with this. I'm sure I have to use different numbers in the <php show_menu(); ?> thing but I can't figure out what to use and the help documentation is just confusing me.

Thank you for you assistance, and thank you for your time!!

kweitzel:
with your menucall you just tell the system to show 2 different menus. That won't help unless you assign pages to them as well. But I don't think that this is the approach you want. From your description you want 2 menus displaying different levels of the same menu. Right?

Level 1 - shows only the root pages
Level 2 - shows the subpages

For that you will need to dive more into the menuoptions. They are explained a bite more here.

Also i think you will need some more understanding of the sections and blocks use within WB. Each Page can contain several sections which in turn can be assigned to different blocks within your template. But you sound like you want the menu to change the sections and not the pages. This will not work within WB, since the menu only supports pages and nothing else.

cheers

Klaus

ruebenwurzel:
Hello,

would try it another way. Not by using the multiple menus. Try it with show_menu2 (is included in WB 2.7) and different parameters. So for the top


--- Code: ---<?php show_menu2(0, SM_ROOT, ......); ?>
--- End code ---

and for the child pages Menu


--- Code: ---<?php show_menu2(0, SM_ROOT+1, ......); ?>
--- End code ---

this means that the top menu starts at the root level and the child menu starts at child pages. For the other parameters you need reed the Readme file of show_menu2 wich you find in /modules/show_menu2 folder.

Hope this helps

Matthias

lorddonk:
Thank you very much for the fast responses! The community here is excellent, too!

After working on it for a long time, I finally got it to work right. I was misunderstanding the $start_level part of the <?php show_menu(); ?> thing.

I have got it to work perfectly! If anyone wants to see what I did, for the top menu I have used:


--- Code: ---<?php show_menu(1,0,1); ?>
--- End code ---

and for the side menu I used:


--- Code: ---<?php show_menu(2,1,-1); ?>
--- End code ---

Thank you all for your assistance!! I have just "baked" my first custom website thanks to you!! :lol: Thank you again!
~lorddonk

Stefek:
Hello LordDonk,
I'm glad you got it work.

I'm too loving WB  :-D

There is one thing I want to let you know.
You allready have done the menu using show_menu.

But please take a look at the advice, ruebenwurzel is givin to you.
The show_menu2 is recommended for using, because it is generating a better html-output.
So you get a cleaner html code and a less confusing (for searchengines) link-structure.

Best Regards,
Stefek

Navigation

[0] Message Index

[#] Next page

Go to full version