Jump to content

Linking a folder to a different page?

Recommended Posts

Site URL: http://levitzmattress.com

Hey everyone,

I'm trying to get the folder name of my nav bar to link to other page.

I know, I know, use <a href>. I did (I used this page for the how-to), and it worked great for a long time. Suddenly it stopped doing anything. It's like the code isn't there.

If someone wouldn't mind, could you go to my site (levitzmattress.com). The "Mattress" nav button should take you to /mattresses-3, which is a guide to help get you to the right mattress. What is actually happening is that it taking you to /mattresses-1 which is just the main product page. What makes things even more complicated, is that its taking you to /mattresses-1 and only showing the Tempurpedic category, instead of all of them.

Similar issues are happening with the Foundations and Accessories nav buttons. How can I fix this?

If you go directly to http://levitzmattress.com/mattresses-1 it does the same thing; only shows you Tempurpedic.  I have links in certain marketing assets that take users to this page. I want it to automatically show All categories upon arriving here. How can that be done?

Any and all help would be greatly appreciated. 

Thanks!

PS This is the Hyde template. 

settings-foundations.png

settings-mattresses.png

settings-access.png

Link to comment
  • Replies 8
  • Views 504
  • Created
  • Last Reply

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>
$(document).ready(function() {
	$('.Header-nav-folder-title[href="/mattresses-1"]').attr('href','/mattresses-3');
});
</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
On 3/27/2020 at 8:53 PM, tuanphan said:

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>
$(document).ready(function() {
	$('.Header-nav-folder-title[href="/mattresses-1"]').attr('href','/mattresses-3');
});
</script>

 

That partially fixes it. I have added that code, and you can see that the first time you click it, it will go to the correct page. If you then click the logo to go back to the home, the nav folder link will take you back to the incorrect page. 

Link to comment
8 hours ago, rlevitz said:

That partially fixes it. I have added that code, and you can see that the first time you click it, it will go to the correct page. If you then click the logo to go back to the home, the nav folder link will take you back to the incorrect page. 

Try disabling Ajax Loading https://support.squarespace.com/hc/en-us/articles/115000253288-Ajax-loading

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

Nav folders by default can have their own url slug just like a page so you can get to the first link in the folder without having to go thru the site menu. 

like mine

https://myrandomviews.com/lessons 

the link is disabled on the nav bar so a viewer doesn't  accidentally chose  it and go back to the first link in the folder when they meant to go to one of the other ones. 

Link to comment
  • 9 months later...
On 3/27/2020 at 10:21 PM, rlevitz said:

Site URL: http://levitzmattress.com

Hey everyone,

I'm trying to get the folder name of my nav bar to link to other page.

I know, I know, use <a href>. I did (I used this page for the how-to), and it worked great for a long time. Suddenly it stopped doing anything. It's like the code isn't there.

If someone wouldn't mind, could you go to my site (levitzmattress.com). The "Mattress" nav button should take you to /mattresses-3, which is a guide to help get you to the right best futons for everyday sleeping mattress. What is actually happening is that it taking you to /mattresses-1 which is just the main product page. What makes things even more complicated, is that its taking you to /mattresses-1 and only showing the Tempurpedic category, instead of all of them.

Similar issues are happening with the Foundations and Accessories nav buttons. How can I fix this?

If you go directly to http://levitzmattress.com/mattresses-1 it does the same thing; only shows you Tempurpedic.  I have links in certain marketing assets that take users to this page. I want it to automatically show All categories upon arriving here. How can that be done?

Any and all help would be greatly appreciated. 

Thanks!

PS This is the Hyde template. 

settings-foundations.png

settings-mattresses.png

settings-access.png

Same issue.

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.