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

jasonsavino’s picture

Status: Active » Closed (works as designed)

Mike, there is already code that does this. It is in the includes/modules/menu.inc file.

mherchel’s picture

Jason,

What do I need to do to enable this code to take effect for my menus that are in the block system?

mherchel’s picture

Issue summary: View changes

quick change to menu. added data-inset="true"