TB Mega Menu 与 special menu items module冲突的解决
TB Mega Menu没有考虑special menu items module模块的配置,下面的链接解决了个这个问题。
https://www.drupal.org/project/tb_megamenu/issues/2019163#comment-8776801
修改这个文件 : modules/tb_megamenu/templates/tb-megamenu-item.tpl.php
将它拷贝到主题的模板文件,改为以下内容:
<li <?php print $attributes;?> class="<?php print $classes;?>">
<?php if ($item['link']['href'] == "<nolink>"): ?>
<span><?php print t($item['link']['link_title']);?></span>
<?php elseif ($item['link']['href'] == "<separator>"): ?>
<div class="tb_separator"></div>
<?php else: ?>
<a href="<?php print in_array($item['link']['href'], array('<nolink>')) ? "#" : url($item['link']['href']);?>" class="<?php print implode(" ", $a_classes);?>">
<?php if(!empty($item_config['xicon'])) : ?>
<i class="<?php print $item_config['xicon'];?>"></i>
<?php endif;?>
<?php print t($item['link']['link_title']);?>
<?php if($submenu && $block_config['auto-arrow']) :?>
<span class="caret"></span>
<?php endif;?>
<?php if(!empty($item_config['caption'])) : ?>
<span class="mega-caption"><?php print t($item_config['caption']);?></span>
<?php endif;?>
</a>
<?php endif;?>
<?php print $submenu ? $submenu : "";?>
</li>
重新调整样式,解决。
Jquery update 冲突,
Drupal7默认的jquery版本太低,升级到1.10后导致不兼容问题。逐个解决,需要。
Menu block, 一个就可以了。
Menu block 与bootstrap主题冲突解决办法:
在主题的template.php添加以下函数
<?php
/**
* Overrides theme_menu_link().
*/
function MYTHEME_menu_link__menu_block($variables) {
return theme_menu_link($variables);
}
?>
参考链接:
https://www.drupal.org/project/bootstrap/issues/1850194#comment-8551799