Jump to content

Looking for a code that links the name of the Folder to the topmost page inside the Folder, essentially a way to hyperlink them?

Recommended Posts

Site URL: https://sageclan.org/

Ideally when you click on "home" for the website to bring you directly to overview
but you can't have more than 2 url links assigned to one page.
=> The same way people one click store and get there

I'd like for "Home", "About", and "Gallery" (Once clicked to bring you to the first page or to go over all the subcomponents of that folder.

As of now, when users click those folders "Home" "About" "Gallery" nothing will happen unless they click the subtopics under them.

 

LOOKING FOR: a code that links the name of the Folder to the topmost page inside the Folder, essentially a way to hyperlink them.

Screen Shot 2020-10-05 at 2.27.11 PM.png

Screen Shot 2020-10-05 at 2.27.52 PM.png

Link to comment
  • Replies 1
  • Views 197
  • Created
  • Last Reply

I have the code to make it clickable, but be aware that it may not work well for mobile viewers. They don't have the ability to open the folder on hover, they have to click the folder to open it, and if this is added they will go straight to your page not one of the categories in the folder. 

 

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

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() { 
	$('.header-nav-folder-title[href="/blog-1"]').click(function() {
		window.location = "/blog";
	});
});
</script>

 

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.