I tried to make my excisting template ready to use with Joomla 3.7.0. Everything went easier then I expected untill I got to the part where I had to implement the menu. In the layout I was using the bootstrap nav-bar with dropdown parts. That is the part where it went wrong.
So I searched how to fix the problem and found a few solutions on this site and the joomla site. The solution that fixed the problem in a kind of way is adding this:
<script type="text/javascript">
(function(jQuery){
jQuery(document).ready(function(){
// dropdown
jQuery('.parent').addClass('dropdown');
jQuery('.parent > a').addClass('dropdown-toggle');
jQuery('.parent > a').attr('data-toggle', 'dropdown');
jQuery('.parent > a').append('<b class="caret"></b>');
jQuery('.parent > ul').addClass('dropdown-menu');
jQuery('ul.dropdown-menu li.dropdown a.dropdown-toggle').hover(
function () {
jQuery('ul.dropdown-menu li.dropdown').removeClass('open');
jQuery(this).parent().addClass('open');
}
);
});
})(jQuery);
</script>
This fixes my problem but there is a little problem and that is that when the page loads you first see the old style and than snaps to the correct version. My guess is because the javascript changes the values later than the page is loaded for the user.
So I searched a little more and found solutions where you have to change
modules/mod_menu/tmpl/default.php
I tried to do a few changes in this places:
// The next item is deeper.
if ($item->deeper)
{
echo '<ul class="nav-child unstyled small">';
}
and
/ The menu class is deprecated. Use nav instead
?>
<ul class="nav menu<?php echo $class_sfx; ?>"<?php echo $id; ?>>
<?php foreach ($list as $i => &$item)
But nothing really solved the problem unfortunately. So is there something I'm missing or is it just not possible to use proper?