WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2: valid XHTML and CSS selectable menus
gavjof:
A new one I'm busy designing for a client.
I also tried the "allcss2" which did not work either.
Like I say - It worked with the default "round" template.
But that template uses "page_menu" to call it's menu. It could be that by using "show_menu2" in other places (in this new template) it is affecting the menu call that uses the [description] variable.
**EDIT**
Yes, all the pages do have a description and I works accordingly in the *round* template.
gavjof:
I've done a few tests and discovered it's down to the code used for the breadcrumbs:-
Code used from demos, http://code.jellycan.com/sm2test/
--- Code: ---show_menu2(0, SM2_ROOT, SM2_MAX+2, SM2_CRUMB, ' > [a][menu_title]</a>', '', '', '', '<strong>You are here:</strong> [a][menu_title]</a>');
--- End code ---
If I remove this menu call the other menu (showing the [description] variable) works fine.
brofield:
--- Quote from: gavjof on March 14, 2007, 02:13:02 PM ---I'm using the following to show a site map for current level pages complete with descriptions:
... using SM2_ALLINFO ...
... but when I try using another template it only returns.
[description=UNKNOWN]
--- End quote ---
As is written clearly in the documentation at
http://code.jellycan.com/files/show_menu2-README.txt
SM2_ALLINFO
Load all fields from the page table of the database. This will result in quite a lot of memory being used and is not recommended, however it will make keywords, descriptions, and other fields available. This data is not loaded by default. NOTE: This flag must be used on the *FIRST* call to show_menu2 *for this menu ID*, or in combination with SM2_NOCACHE otherwise it will have no effect.
Make sure that SM2_ALLINFO is being used in all calls to sm2 in the template.
Brodie
gavjof:
Nice one, I never read that far :oops:
All good now.
hobo_geek:
So I have a small problem. I'm using show_menu2 to create a dropdown box menu. However, I can't seem to get it to work. I know I must be doing something stupid with the <option> in it. Here is the code:
--- Code: ---<select name="drop_menu">
<?php show_menu2(0, SM2_ROOT, SM2_START, '<option value="[menu_title]">[a][menu_title]</a>', '</option>'); ?>
</select>
--- End code ---
Any help will be appreciated. Thanks.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version