Streaming live at 10am (PST)

Linking to Collections Pages from Dropdown menu


#1

I have a dropdown menu that I want to link to specific pages of a collection (Collection is called 'Spirits') Right now I have them linked via external URL, but this opens up the page in a new window, which I do not want to have happen. It seems like there should be 2 different ways to solve this, and I could use some help figuring it out:

  1. Is there a way to link directly to specific pages of a collection from the dropdown menu links?
  2. Can I change the settings of my external URL links to not open in a new window? Better yet, can I toggle these specific links to not do that?

Thanks!
Ben


Here is my public share link: https://preview.webflow.com/preview/coffee-cocktails?preview=ea2ef1d62a03c40e6a99b773994196c3
(how to access public share link)


#2

Was just able to figure out a solution!

I went back and read this thread about the opposite problem (link opening in a new window) and changed the script to force to link to open in the same tab.

  <script>
            jQuery(document).ready(function() {
            jQuery(".dropdown-links a").attr("target", "_self");
          });
    </script>

I pasted this in the custom code section of the page I was working on and it worked just like it was supposed to. Note, you have to make sure the script points to the class of the link you are using (in my case, the name of my class was "dropdown links")


#3

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