HubSpot Ideas

Jsum

no_wrapper=True interferes with extra_classes=""

I am installing some bootstrap 4 templates that I created into Hubspot and I needed to add "nav-bar nav" as classes. I usually use no_wrapper=True on my modules and I just realized that the "extra_classes" classes are applied to the outer most wrapper which is removed with no_wrapper=True.

 

I need these classes to be on the ul anyways so an update to this would not solve my issue but it did get me thinking about advanced menus and how you can't really do much with them. With most modules you can use export_to_template_context=True and then loop through the contents, structuring the output as desired. 

 

In a situation like this, where I am using a framework not supported by Hubspot, I have to get hacky to apply the propper classes to the ul.

 

I image you couldn't change extra_classes to apply to the internal html of a module instead of the wrapper because it would break the css of any site in the last 8 or 9 years that has used the extra_classes parameter. But it would be great if there was a new parameter like "internal_classes" that would apply to the most functional inner wrapper (ul in the case of the menu).

 

That would be the second best case scenerio, the best being us having the ability to create our own menu using export. 

1 Reply
kleonard
HubSpot Product Team