Remove title from Superfish Drupal 7 menu

I am working with Drupal for the first time and was able to find answers to all my other questions, so far, in Drupal formats or in other ways. However, I can’t find a way to remove the β€œMain Menu” heading from my superfish menu.

I created an area called superfish and added the superchish to it successfully. But there is a menu above

Main menu

I would like to delete. There seems to be no way to do this from the superfish options, and I cannot find where the code that it is being added is located, otherwise I would just comment on this line. I searched the superfish.js file as well as the "superfish.module" file and did not seem to find it. At first I’m a programmer and a "web designer", so getting hands in some code is not a problem, in fact, I would prefer to do it this way.

Has anyone else done this? Or do you know where I should start to look?

This is the html that is created at runtime:

 <div id="superfish"> <div class="region region-superfish"> <div id="block-superfish-1" class="block block-superfish contextual-links-region"> <h2>Main menu</h2> <div class="contextual-links-wrapper contextual-links-processed"> <div class="content"> <ul id="superfish-1" class="menu sf-menu sf-main-menu sf-horizontal sf-style-simple sf-total-items-2 sf-parent-items-1 sf-single-items-1 superfish-processed sf-js-enabled sf-shadow"> <li id="menu-221-1" class="active-trail first odd sf-item-1 sf-depth-1 sf-no-children"> <li id="menu-312-1" class="active-trail last even sf-item-2 sf-depth-1 sf-total-children-1 sf-parent-children-0 sf-single-children-1 menuparent"> </ul> </div> </div> </div> 

Thanks!

+4
source share
2 answers

I came across a real answer ... Isn't it funny that someone is trying to understand when they stop thinking about them?

The main menu title was the title of the block, when editing a block of superfishes the very first field is Block Title , this allows you to override the default value of the title of the block. By placing <none> in this field, the block title is no longer displayed.

+4
source

Besides the fact that the output of this HTML is an ideal solution, you can use jquery after the fact to remove the header.

 $('#superfish h2').html(''); 

jsfiddle here: http://jsfiddle.net/DetEb/

+1
source

Source: https://habr.com/ru/post/1479981/


All Articles