Commit ce8928ba authored by jonnybradley's avatar jonnybradley

[FIX] menus: Change menu_class as introduced in r64387 to bs_menu_class as...

[FIX] menus:  Change menu_class as introduced in r64387 to bs_menu_class as menu_class already existed in the menu module and was passed on to the menu function inadvertently (and seems to be unused with bootstrap menus)
This was breaking upgrades with legacy menu_class set on the module but using bootstrap (thanks Luci and marclaporte)
parent 99283036
......@@ -18,7 +18,7 @@ if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
* - id = menu ID (mandatory)
* - translate = y|n , n means no option translation (default y)
* - menu_cookie=y|n (default y) n, it will automatically open the submenu the url is in
* - menu_class='' custom class for the top level menu element
* - bs_menu_class='' custom class for the top level bootstrap menu element
* - sectionLevel: displays from this level only
* - toLevel : displays to this level only
* - drilldown ??
......@@ -54,10 +54,10 @@ function smarty_function_menu($params, $smarty)
$smarty->assignByRef('menu_cookie', $menu_cookie);
if (empty($menu_class)) {
$menu_class = '';
if (empty($bs_menu_class)) {
$bs_menu_class = '';
$smarty->assignByRef('menu_class', $menu_class);
$smarty->assignByRef('bs_menu_class', $bs_menu_class);
list($menu_info, $channels) = get_menu_with_selections($params);
$smarty->assign('menu_channels', $channels['data']);
<ul class="{if $menu_class}{$menu_class}{else}nav{/if}">
<ul class="{if $bs_menu_class}{$bs_menu_class}{else}nav{/if}">
{foreach from=$list item=item}
{if !empty($item.children)}
<li class="{$item.class|escape|default:null}{if !empty($item.selected)} active{/if}">
<ul class="{if $menu_class}{$menu_class}{else}nav navbar-nav{/if}">
<ul class="{if $bs_menu_class}{$bs_menu_class}{else}nav navbar-nav{/if}">
{foreach from=$list item=item}
{if $item.children|default:null|count}
<li class="dropdown{if $item.selected|default:null} active{/if} {$item.class|escape}">
......@@ -104,7 +104,7 @@ if (jqueryTiki.no_cookie) {
{menu id=$module_params.menu_id bootstrap='y' menu_class='dropdown-menu'}
{menu id=$module_params.menu_id bootstrap='y' bs_menu_class='dropdown-menu'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment