This module’s great. Thanks!

When using references, numbers aren’t very useful to me unless they are ordinals based on names that I'm managing or if they're used for arithmetic, so the name that came up for one of my menu_block menus, menu-block-3 was problematic. Besides not being easy to remember or associate with its purpose while styling CSS, it can change. Consequently, I modified the module to also create a named class in addition to the numeric class name.

I also had styling problems trying to override id (#) selectors, so I added an option to create a CSS ID, too. To take advantage of that capability, you’ll need to update your menu-block-wrapper template file to match the change in this patch.

You can associate the styling among block submenus by giving them all the same class name, but you’ll need to change the template to remove the CSS ID.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DanielF’s picture

This feature would've been nice to have for my most recent project. So, here I am, clamoring for it. Could we get this reviewed and committed?

stefan.r’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Issue summary: View changes
FileSize
5.11 KB
rwam’s picture

#2 work's as expected with menu_block 7.x-2.5

Nice work, thanks.

aitala’s picture

The patch failed on the 2.7 and dev version of the module...

Any ideas?

E

mansspams’s picture

Status: Needs review » Needs work

Cannot apply to dev.

silvi.addweb’s picture

PFA patch which works fine for 7.x-2.x-dev and 7.x-2.7

silvi.addweb’s picture

Status: Needs work » Needs review

The last submitted patch, menu_block.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 6: add_a_named_css_class-898616-6.patch, failed testing.

silvi.addweb’s picture

PFA patch which works fine with versions 7.x-2.x-dev

silvi.addweb’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 10: add_a_named_css_class-898616-10.patch, failed testing.

The last submitted patch, 10: add_a_named_css_class-898616-10.patch, failed testing.

TechNikh’s picture

FYI, The above patch introduces an error as reported by Drulenium visual testing at http://drulenium.org/projects/drupal-module-menublock-7x-2x-desktop
visual error

silvi.addweb’s picture

Status: Needs work » Needs review
FileSize
7.42 KB

Attached patch solved #14 errors as well.

Status: Needs review » Needs work

The last submitted patch, 15: add_a_named_css_class-898616-15.patch, failed testing.

silvi.addweb’s picture

Status: Needs work » Needs review
FileSize
5.66 KB

Re submitting patch to correct formatting issues.

Status: Needs review » Needs work

The last submitted patch, 17: add_a_named_css_class-898616-17.patch, failed testing.