WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
brofield:
Sure. Use the conditional formatting and exclude the current item.
show_menu2(0, SM2_CURR, SM2_CURR, '','[if(class!=menu-current){- [a][menu_title]</a><br>}]','','','<br>'); ?>
For it working, see http://code.jellycan.com/sm2test/
Search for the test case "Show only siblings (not current)"
dw2006:
Wow, now that was a lightening fast response. Thanks!
To quote Steve Jobs: One more thing ;-) ...
Is there a way to have the name of the parent in the menu's header?
What I mean is a result like:
--- Code: ---Other pages in the category "XYZ" are:
- sibling
- another sibling
--- End code ---
(Right now it is "other pages in this category" without saying what category it currently is...)
Greetings and Thanks again! :)
brofield:
Probably. What you are trying to do is call sm2 such that it only outputs the title of the current page. i.e. change the output format to show only the page name. Then restrict the processing to only the current level. Then use conditional formatting to exclude everything except the current page. I'll leave the actual code as an exercise in thinking for yourself.
dw2006:
thanks for showing the logic of this. Something for me to do over the holidays! I will feel like a real hacker! ;-)
brofield:
Actually no. I missed that you wanted the parent page. The current page is available via PAGE_TITLE, but the parent page isn't and I don't think that there is a way to get it via the current SM2. Try the new version 4.0 and see the example at http://code.jellycan.com/sm2test/pages/conditional/show-only-parent.php
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version