2

Long story short, I'm building a Superfish menu structure that looks like the following:

1]:![ [https://i.sstatic.net/hXdaz.png1

I'm using superfish & have everything in order except the labels on each of the sub-menus (GUIDES and BUSINESS STRATEGIES in the image)

How can one duplicate the parent link & add it to the sub-menu as a label above the links?

Ideally the strcture would look something like:

<ul>
  <li><a href="">Link 1</a></li>
  <li><a href="">Link 2</a></li>
  <ul>
    <span class="label">Link 2</span>
    <li><a href="">Link 3</a></li>
    <li><a href="">Link 4</a></li>
    <ul>
      <span class="label">Link 4</span>
      <li><a href="">Link 5</a></li>
      <li><a href="">Link 6</a></li>
    </ul>
  </ul>
</ul>

Thanks All, I'm stuck on this one, open to any & all solutions.

Edit: I should have specified that the labels need to be added automatically. I don't want to make the client add a bunch of duplicate labels by hand if I don't have to.

1 Answer 1

0

Take a look at the Special Menu Items module. What does it do?

"Special menu items is a Drupal module that provides placeholder and separator menu items" (1)

A placeholder is defined as

"A placeholder is a menu item which is not a link. It is useful with dynamic drop down menus where we want to have a parent menu item which is not linking to a page but just acting as a parent grouping some menu items below it." (1)

Which matches your description of 'labels' in your question.

3
  • I should have specified that it needs to be automatic, adding the labels manually for every sub-menu is going to get pretty extensive.
    – Matt
    Commented Jan 6, 2015 at 2:10
  • Perhaps you can modify the Special menu items module to make it so that if client ticks a checkbox, automatically a label (aka special menu item) is created? Commented Jan 6, 2015 at 7:41
  • I'm sure it's possible, it's a bit over my head though.
    – Matt
    Commented Jan 6, 2015 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.