Streaming live at 10am (PST)

How to get to "current" state of dropdown toggle?


#1

Hi,

How do I get to the "current" state of the dropdown toggle...I want to have main dropdown text link show an active state when one of its menu link pages is being used. This may or may not get me there.

Thoughts?

Best,

Nathan

http://a-living-theory.webflow.io

https://preview.webflow.com/preview/a-living-theory?preview=a94ce00d956e347412f774b183f9f4e7


Here is my public share link: LINK
(how to access public share link)


#2

Hi @nathanphilsteele great question! You cannot actually set the current state of a dropdown toggle unless you have a text link in your dropdown and you're on the page it is linked to.

When you navigate to a sub-page which you link to from a dropdown link in your dropdown:

You could try detaching your navigation symbol for those certain pages and giving your dropdown a combo class to style it.


#3

I think it may take a minute to figure out exactly what you are talking about...so it may take me a minute for an official reply.

Thanks @Waldo

Nathan


#4

Hi @Waldo,

It appears I don't quite exactly get what you are saying...can you maybe go into a little more detail?

Best and thank you in advance,

Nathan


#6

Hi Nathan

Samliew helped me with this some time ago. Perhaps this will solve your problem?

Would be very useful if this was an "settings option" in Webflow, not custom code!


#7

Sorry @IggsTP, think I flagged your post by mistake!


#8

What was your original post @IggsTP?

Best,

Nathan


#9

Agreed on the settings option for sure! @Christoffer

It appears the initial design that the code was created for has changed since the original posting...I'm have a hard time paring out where to put what element. For instance, ".w-" the name of one of your elements?

Best,

Nathan


#10

Hi @samliew,

I tried the solution mentioned in here: https://forum.webflow.com/t/current-class-on-on-the-actual-dropdown-toggle-button-in-navbar/33062/4 and replaced dropdown-active with nav-menu-text-dropdown-sub but the behavior I got was that arrow overlapped the text and no color change...thoughts?

Best,

Nathan


#11

You styled it to have no padding, so the arrow does not have anywhere to go.


Assigning a "Current" class to dropdown menu to show active parent menu
#12

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.