Frequently, I create a separate 'mobile' menu specifically for the mobile version of my site. However within the D7 version of mobile_jquery, if I drag the menu block into a visible region, it doesn't convert to a Jquery Mobile Listview (using the data-role="listview").
I'm able to get around this by creating a template.php in my subtheme and adding the following, but IMHO the theme should automatically do this... I can see this being a common use case.
Thanks,
<?php
function YOURTHEME_menu_tree($variables) {
return '<ul class="menu" data-role="listview" data-inset="true">' . $variables['tree'] . '</ul>';
}
Comments
Comment #1
jasonsavino commentedMike, there is already code that does this. It is in the includes/modules/menu.inc file.
Comment #2
mherchelJason,
What do I need to do to enable this code to take effect for my menus that are in the block system?
Comment #2.0
mherchelquick change to menu. added data-inset="true"