Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 22

Can I link a folder to a specific page?


UtopiaCreates

Question

As brought up here: http://answers.squarespace.com/questions/8532/folder-navigation-top-folder-doesnt-link-to-anything-can-i-get-it-to-or-remove-link-behavior

Folders should have a click through link so that it can be clicked to go to another page. It should work the same as a regular folder in that it should still have an active colour if that has been set so that if you are on a page that is held within that folder or the page the folder link is connected to the "active color" works.

Please vote up if you agree.

Another possible option is to make a special kind of page that works like a folder in that anything placed under it shows up in navigation as a drop down but it is also a normal page and can have content on it. That would save having to create a special no linked page that works with the pass through. Maybe have a check box or such for people that want it to just act like a normal Folder.

Edited by danieljs
retag
Link to comment

Recommended Posts

  • 0

To have a folder in the navigation header link directly to a page:

First you have to have a page to link to the Not Linked section of your page list.

Then you can use the Header code injection.
(Home)/ Settings/ Advanced/Code Injection/Header ... paste HTML code.


<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(function() {
 $('.main-nav li a').each(function () {
if ($(this).text() == 'Folder1') {
$(this).attr('href','http://www.hsustudios.com/page1');
$(this).attr('onclick','true');
}
if ($(this).text() == 'Folder2') {
$(this).attr('href','http://www.hsustudios.com/page2');
$(this).attr('onclick','true');
}
 });
});
</script>

<!-- note -->

for adding invisible notes in html

This worked for me in Ishimoto.

Edited by jpwv
Link to comment
  • 0

Actually, referring back to the earlier answers, if you are pointing at a js library you'll want to avoid mentioning HTTP or HTTPS otherwise you'll find it will or won't work depending on the way you're accessing your site. Better to use

<script src="//code.jquery.com/jquery-latest.min.js"></script>

sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi! I'm Paul, an independent Squarespace Consultant since 2007 and founder of SF Digital, building the features that Squarespace didn't include. Our mini-extensions allow you to pick dates in any format, show prices in other currencies, take orders without payment or improve your cartI value honesty, integrity, transparency and respect . Links in my posts may refer to SF Digital products or may be affiliate links.

Link to comment
  • 0

Hello,

I am using the Brine template and I have injected a similar code into my site's header, to no effect. I have tried capitalizing the text as seen in the browser and using http, https or nothing at all in the js tag, however it still doesn't work.When I hover the mouse over the folder, before clicking, I don't see the link I wrote in the href appearing in the bottom of the browser (Chrome).

Any ideas?Thanks

Edited by miguelprata
Initial Revision
Link to comment
  • 0

Hi there!

Tiny beginner question for you.

I changed : http://www.hsustudios.com/page1 with my website link but It leads to no were cause I created a mywebsite.com/name.i.want.for.this.folder.link but it doesn't exist so logically there is nothing related to each other.?

So my questions: - Do you paste this in the header? - How do you create the href link name? - Are the folder1 and folder2 detected automatically but the code through my website? - Is the src script is suppose to be my website name?

I'll be waiting from you! Thanks a lot Laury :)

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...