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

show_menu2: valid XHTML and CSS selectable menus

<< < (40/64) > >>

lleighh2:
@brofield So sorry for upsetting you or for suggesting that my time was more important than yours. I just don't understand the documentation or the examples and i thought that since everyone else on this thread seems to be getting it and i'm not then i could draw on the collective success of you all. please forgive my faux pas. and thank you so much for your help.

btw. that's exactly what i've had in my css all along. not sure why it's not working. i try not to won't bother you again.

nickleermans:

--- Quote from: nickleermans on April 28, 2007, 02:20:43 PM ---I've tried many combinations of the code but I can't find the right one.

I have the following:

Topic 1
- Sub Topic 1a
- Sub Topic 1b
- Sub sub Topic 1ba
Topic 2
- Sub Topic 2a
- Sub Topic 2b
- Sub sub Topic 2ba
- Sub sub Topic 2bb

What I want is:

When you are in one of Topic 1's Children (Sub Topic 1a, - Sub Topic 1b or Sub sub Topic 1ba) then I want the menu to show all of the children of 1.

When you are in one of Topic 2's Children (Sub Topic 2a, - Sub Topic 2b, Sub sub Topic 2ba or Sub sub Topic 2bb) then I want the menu to show all of the children of 2.

The result has to be that there are 2 menu's: one with all the children (and sub children) of Topic 1 and one with all the Children (and sub children) of Topic 2.

I hope that someone know what I mean and have an answer!  :-D

--- End quote ---


This is my original post. And this is an answer:


--- Quote from: kweitzel on April 28, 2007, 06:37:24 PM ---read the documentation of show menu 2 and make the relevant page_ids the starting point.

--- End quote ---

I found out that with this:
--- Code: ---show_menu2(0, 1, SM2_ALL, SM2_ALL);
--- End code ---
I can replace the second number (=1) with the number of the root. But how can I change this number when the menu is changing?

Can anyone find an answer to my original question?

brofield:
Version 4.3 now available at http://code.jellycan.com/show_menu2/


* Support for a new flag, SM2_BUFFER. This turns on internal buffering of menu HTML which is then returned from the show_menu2() function allowing easy post processing of the output.
* Support for a new flag, SM2_CURRTREE. This limits the output to only menu items that exist in the same rooted menu tree as the current page.
See the new examples at the SM2TEST website:
"Tree rooted at parent item" showing use of the SM2_BUFFER flag
"Current Tree Only" showing use of the SM2_CURRTREE flag

http://code.jellycan.com/sm2test/pages/enterprise/cogs-wheels/cogs/little.php

nickleermans: use the SM2_CURRTREE flag as in the example.

B

brofield:
Version 4.4 now available at http://code.jellycan.com/show_menu2/


* Support for a new flag, SM2_ESCAPE to turn on HTML escaping of output. Shouldn't be needed, but just in case.
* Deprecated use of SM2_NOESCAPE and made it the default, since the latest version of WB escapes the strings before adding them to the DB.

spida:

--- Quote from: kweitzel on April 28, 2007, 06:37:24 PM ---Easiest way ... make 2 menu's (look for multiple menu in forum). Use standard menu call in template, just calling the menu numbers.

--- End quote ---

Hi Klaus and all,

I used the search for "multiple menu" but didn't find quite what I am looking for, thus I just ask here:
I have this site with three menus:
1. is the main navigation
2. is the subnavigation of second level pages
3. is supposed to be a service navigation with links to contact page etc.

I have it in index.php like this:
Mainnavigation:
--- Code: ---<div id="navigation">
            <?php show_menu2(0, SM2_ROOT, SM2_START);?>
            </div>
--- End code ---
Subnavigation:
--- Code: ---<div id="rechtespalte">
            <?php show_menu2(1,SM2_ROOT+1, SM2_START);?>
            </div>
--- End code ---
Service navigation:
--- Code: ---<div id="metanav">
            <?php show_menu2(2, 19, SM2_ALL, SM2_ALL);?>
            </div>
--- End code ---
My info.php says:
--- Code: ---$menu[1]='Hauptnavigation';
$menu[2]='Subnavigation';
$menu[3]='Metanavigation';
--- End code ---
and multiple menus is enabled in the admin.
Main and sub navigation both work properly, but pages I assign "Metanavigation" to in the page's prefernces are simply not shown in any of the menus.

I also tried

--- Code: ---$menu[0]='Hauptnavigation';
$menu[1]='Subnavigation';
$menu[2]='Metanavigation';
--- End code ---
in the info.php with the same negative results.

The navigations' "physical" order in the html is:
meta navigation first
then main menu
and after that sub menu

... don't know whether this is of relevance.

Obviously I have still not understood the menu2 stuff completely and would some help appreciate very much.

Thanks in advance,
Ayshe

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version