WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
lanesharon:
Brofield, You might want to remove the references to the udm4 menu, since you are releasing your show_menu2 product as GPL. udm4, per their website - "is not open-source or public domain software". Read the rest here:
http://www.udm4.com/licensing/terms/
I have a menu that I use on another website that uses the popout feature. You may want to look here for it:
http://www.xs4all.nl/~peterned/
masarin:
I am making my first WB Template and want it to be valid XHTML Strict.
When validating the template I get the error: there is no attribute "target"
The "<?php show_menu2(); ?>" prints the menu items like this:
<ul class="menu-top">
<li class="menu-sibling menu-first">
<a href="http://mysite/wb" target="_top">Hem</a>
</li>
</ul>
Q:
Is there a way to make show_menu2 print the "<a>" tags without the "target=" attribute?
doc:
Hello,
yes this is possible with the show_menu2 code snippet. Please read the documentation of the developer which explains what parameters you need to change (section FORMAT STRINGS).
Regards Christian
masarin:
Tnx.
Uhh, thats hard reading for a non PHP programmer, but I managed to come up with this that's vaidates as XHTML Strict:
--- Code: ---<?php show_menu2(0, SM2_ROOT, SM2_CURR+1, SM2_PRETTY, '[list][li]<a href="[url]">[menu_title]</a>'); ?>
--- End code ---
I then tried to add some other parameters like "SM2_MAX+1" to limit the menu to two levels (root an one sublevel) but then the whole menu disappeared. So I don't really understand the syntax here, it was just luck.
Guess I have to read the documentation a few times more then..
kozmoz:
We had a little issue with our menu.
When we displayed a page that was at the second level of the menu, suddenly all of its sibling items disappeared. Opening a child at the third level reveals the menu items again.
Now in the sm2_recurse() function I have added an extra check.
This fixed the bug we had, but I'm not sure if it's done right:
in include.php:
--- Code: --- else if ($aFlags & SM2_TRIM) {
// parents and siblings of parents
// Always show the siblings
if (!array_key_exists('sm2_is_sibling', $page)
&& !array_key_exists('sm2_on_curr_path', $page) // not set if false, so existence = true
&& !array_key_exists('sm2_path_sibling', $page)) { // not set if false, so existence = true
continue;
}
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version