Custom Advanced Menu

SOLVE
tstrack
Contributor | Platinum Partner

Is there a way to develop a custom nav using the Advanced Menu module?

 

For example:

 

{% menu "main_menu" site_map_name='Default' %}
<ul>
{% for item in widget_data.main_menu %}
<li>
<a href="{{ item.link }}">{{ item.label }}</a>
</li>
{% endfor %}
</ul>

1 Accepted solution

Accepted Solutions
Jsum
Solution
Key Advisor

@tstrack,

 

Short answer: no..

 

There is a suggestion to remedy  this in the ideas forum. It would be very useful. Boostrap3-4, for instance, requires certain classes on the ul's, li's, and a's depending on the functionality you want to use. Currently my only solution is to inject the classes using javascript or rewrite the functionality to comform to Hubspots navigation markup which defeats the purpose of using a framework. There are tons of other examples of why this would be a great idea. If you find something please let us know.

View solution in original post

0 Upvotes
2 Replies 2
Jsum
Solution
Key Advisor

@tstrack,

 

Short answer: no..

 

There is a suggestion to remedy  this in the ideas forum. It would be very useful. Boostrap3-4, for instance, requires certain classes on the ul's, li's, and a's depending on the functionality you want to use. Currently my only solution is to inject the classes using javascript or rewrite the functionality to comform to Hubspots navigation markup which defeats the purpose of using a framework. There are tons of other examples of why this would be a great idea. If you find something please let us know.

View solution in original post

0 Upvotes
tstrack
Contributor | Platinum Partner

Thanks for the reply! Yes, I've used javascript to inject the classes as well but ran into a short delay from the javascript loading. That delay was a deal breaker for me.

 

I'm trying to implement the Bootstrap 3 navigation into our agencies templates since most of our sites are built upon that framework.

 

I've had decent luck using the HubSpot menu and it's default classes, but it's a bit more time intensive than integrating the Bootstrap nav.

 

I'll continue to poke away at this in my free time and will be sure to update this thread if I find a better solution.

0 Upvotes