Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Simple Menu Icons module classes not written to menu items #355

Open
stephencapellic opened this issue Jan 7, 2020 · 4 comments
Open

Simple Menu Icons module classes not written to menu items #355

stephencapellic opened this issue Jan 7, 2020 · 4 comments

Comments

@stephencapellic
Copy link

emulsify version (see releases):

3.0

node version:

11.15.0

npm (or yarn) version:

6.7.0

What you did:

Installed Simple Menu Icons (simple_menu_icons) module, added menu to footer, uploaded an icon to a menu item, saw the menu item title but not the icon.

What happened:

Menu item icon did not appear.

Reproduction repository (if necessary):

n/a

Problem description:

This module produces CSS menu (sites/default/files/css/menu_icons.css) and the structure looks like this where the icon is added through a background image:

a.menu-icon-15,
ul.links li.menu-icon-15 a,
ul.menu li.menu-icon-15 a {
  background-image: url(/sites/default/files/menu_icons/linkedin-16.png);
  padding-left:16px;
  background-repeat: no-repeat;
  background-position: left center;
 }

I found that my menu code markup was like this:

<ul class="menu menu--level-0">
  <li class="menu__item menu__item--level-0">		
    <a class="menu__link menu__link--level-0" href="https://linkedin.com">LinkedIn</a>
  </li>
</ul>

I've also added this issue as a comment on Drupal.org: https://www.drupal.org/project/simple_menu_icons/issues/2998171#comment-13414675

Suggested solution:

@welcome
Copy link

welcome bot commented Jan 7, 2020

Thanks for opening your first issue here! Be sure to follow the issue template!

@evanmwillhite
Copy link
Contributor

We're not doing anything programmatic to manipulate menus, so the only thing I can think of in Emulsify that might impact this would be our menu files which impact all menus (menu-item and menu). These are derived from the Stable base theme - can you confirm it works with the Stable theme by switching to that and testing?

@stephencapellic
Copy link
Author

Thanks @evanmwillhite for the quick response.

I was able to see the icon associated to the menu item when I placed that menu's block in the header of the Seven theme.

@evanmwillhite
Copy link
Contributor

So I do think this is likely an issue with Emulsify then, so I'm glad you posted here. I may have time early next week to look into it, but if it is more pressing than that, you could start by debugging those template files I mentioned (specifically the menu item one) versus Stable's and see where that module's code interacts with the menu item template file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants