Jump to content

How can I make a folder link to a page

Recommended Posts

Hello, I am using the corrigan template and am trying to use folders to make a more practical menu. I have read some other blog posts about how to link a folder to a page and not make the page appear in the dropdown box but none of it is working. How can I make a folder a page/link to a page? Thank you for any help!!

Link to comment
  • Replies 7
  • Views 774
  • Created
  • Last Reply
23 hours ago, candidmkting said:

Two folders: The first being Why El Dorado and the second Shovel-Ready Properties. I want to be able to link when they click the dropdown.

Add to Home > Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$("a.header-nav-folder-title[href="/why-el-dorado-1"]").click(function() {
    var link = $(this).text(),
        href = "/talent";
    window.location.href=href;
});
  $("a.header-nav-folder-title[href="/shovelready-properties-1"]").click(function() {
    var link = $(this).text(),
        href = "/contact-us";
    window.location.href=href;
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Okay. Remove above code and add this

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(".header-nav-item:first-child a").click(function() {
    var link = $(this).text(),
        href = "/why-el-dorado-1";
    window.location.href=href;
});
  $(".header-nav-item:nth-child(3) a").click(function() {
    var link = $(this).text(),
        href = "/shovelready-properties-1";
    window.location.href=href;
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.