WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
Stefan:
--- Quote from: brofield on February 22, 2006, 02:04:20 AM ---Valid XHTML
The existing menu function generates HTML that doesn't validate. Minor concern really, but many people like to have valid HTML.
--- End quote ---
The core function show_menu should generate valid html too... Or do you have problems with it?
brofield:
A friend had led me to think that it was generating invalid HTML. Something like:
<ul>
<li>item</li>
<li>item
<li>
<ul>
<li current>item<li></li></li>
<li>item</li>
</ul>
</li>
</li>
<li>item</li>
</ul>
It must have been a communication breakdown. I'll fix the comment in the main entry.
ruebenwurzel:
@brofield
i like your new menu function i only had problems with hidden pages.
Had a main Page wich has visibility public and two subpages under this with visibility hidden. If i click on the public page link got the following error:
--- Code: ---Warning: array_keys(): The first argument should be an array in .....\modules\show_menu2\include.php on line 247
--- End code ---
And a question to the parameters. I Have two menus. One horizontal wich only plays the root level and a vertical submenu wich only should display the subnavigation.
Menustructure:
Page
Subpage1
Subpage 1.1
Subpage 1.2
Function call:
<?php show_menu2(1, -1); ?>
Result:
when you on Main Page it shows in the submenu Subpage1 what is ok
when you on Subpage1 it shows in the submenu Subpage1, Subpage 1.1 and Subpage 1.2 what i dont like.
I'm looking for the parameter wich shows me on the Subpage1 in the submenu only the Subpage 1.1 and Subpage 1.2.
Could you pleas give me a hint how to get this?
Thanks
Matthias
brofield:
--- Quote from: ruebenwurzel on February 22, 2006, 11:04:47 AM ---Had a main Page wich has visibility public and two subpages under this with visibility hidden. If i click on the public page link got the following error:
--- Code: ---Warning: array_keys(): The first argument should be an array in .....\modules\show_menu2\include.php on line 247
--- End code ---
--- End quote ---
I don't see this error. The page http://riseup.co.nz/pages/parent.php has 3 children, 2 are hidden and 1 is private. It works fine for me there. I'm not sure how to help you without being able to reproduce the error.
--- Quote from: ruebenwurzel on February 22, 2006, 11:04:47 AM ---I Have two menus. One horizontal wich only plays the root level and a vertical submenu wich only should display the subnavigation.
<snip>
when you on Main Page it shows in the submenu Subpage1 what is ok
when you on Subpage1 it shows in the submenu Subpage1, Subpage 1.1 and Subpage 1.2 what i dont like.
I'm looking for the parameter wich shows me on the Subpage1 in the submenu only the Subpage 1.1 and Subpage 1.2.
Could you pleas give me a hint how to get this?
--- End quote ---
Using page http://riseup.co.nz/pages/foo.php
See the example "Root Level Only" to display only the root level.
See the example "First Level" to display only the children.
I think this is what you are after, otherwise you might want "Current Children" or "Current Kids (1 level)".
Regards,
Brodie
brofield:
Updated to version 2.1
* remove all warnings and notices when running PHP at error_reporting = E_ALL
* no other changes at all, no need to upgrade if the warnings don't affect you
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version