This module breaks the special menu items module as it overwrites the nolink and separator string. This same issue happens in superfish menu system.

There was a similar fix here:
https://drupal.org/node/1273602

tb_megamenu has to account for rewritten strings such as nolink and separator.

screenshot: http://prntscr.com/19shja

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

themebrain’s picture

Hi duckx,

Thanks for your information. This is in fact a special issue we need to take care of, since this is clashing between modules. Next release will have this fixed!

themebrain’s picture

Dear Duckx,

Our alpha version has been released and fixed your reported bug. Please have a look and let me know if there's any other problem.

Cheers and have a nice weekend!

themebrain’s picture

Status: Active » Needs review
patoshi’s picture

Status: Needs review » Fixed

thanks! really really amazing job on the module.. its the best one i would say...

also, you fixed the nolink> URL option, but there is also a separator> one too.

t_radigan’s picture

I have the DEV version of this module installed but the 'nolink' option does not appear to function as expected. My URLs are still getting written as http://<sitename>/<nolink>. Any ideas? Is this issue not fixed in DEV? Only the Alpha release?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

new

tenuis’s picture

Issue summary: View changes

I wanted to use TB Mega Menu with special menu items, so I have modified a file to make it work (it's a WIP, as the CSS have to be updated as well to style those elements and the separator could be something else), I share it now in case someone is in need to use this ASAP.

In file : 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>
andjsmit’s picture

#7 works great for me. Only addition I made was to include a class on the no link span and remove redundant no link check.

<li <?php print $attributes;?> class="<?php print $classes;?>">
  <?php if ($item['link']['href'] == "<nolink>"): ?>
    <span class="tb_nolink"><?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 url($item['link']['href'], $item['link']['options']);?>" <?php echo drupal_attributes($item['link']['#attributes']); ?>>
      <?php if(!empty($item_config['xicon'])) : ?>
        <i class="<?php print $item_config['xicon'];?>"></i>
      <?php endif;?>    
      <?php print t($item['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>
loparr’s picture

Hi,
I confirm #8 works (class on nolink span is useful). This should be committed.

VladSavitsky’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc2

Version 7.x-1.0-rc2 bug appears. Please reopen issue.

VladSavitsky’s picture

I've used code from comment 8 to make the patch.