Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Menu (CSS list menu) to retract on click View modes: 
User avatar
Member
Member
Yalın - 4/21/2010 4:47:18 PM
   
Menu (CSS list menu) to retract on click
When we click our side menus they expand if there are sub menu items, how do we make them retract when they're clicked again? Currently it simply sits there and does nothing if we click on the same main menu.

User image

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 5/3/2010 7:47:12 AM
   
RE:Menu (CSS list menu) to retract on click
Hello,

Actually CSS List Menu doesn't have this accordion ability out-of-the-box. You will need to adjust it and connect with some external javascript library.

For instance, you can take inspiration in here: http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html. You can also find plenty other examples around the internet. Please note that you will need to parse the CSS List Menu to have correct HTML code using RenderedHTML property.

On the other hand you can use Repeater webpart where you have full control over the HTML code it generates. Well, in this case it will be necessary to add some Where condition to simulate behavior of Menu webpart (some transformation function will be needed as well).

Hope it sheds some light at least a bit.

Best regards
Ondrej Vasil