atanasmalamov Posted March 23, 2020 Share Posted March 23, 2020 Site URL: https://atanasmalamov.com Hi guys, I have looked on the forum but have not found a solution that works for me. I am using the Haute template. I have a folder on my navigation with 4 pages inside. Currently if i click on "Dance with Atanas" it opens the first page in the folder. My goal is upon click on "dance with Atanas" to take you to a specific page not the first page in the folder. Is that possible? Thank you and sorry if solution was listed somewhere Link to comment
tuanphan Posted March 23, 2020 Share Posted March 23, 2020 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> $(".Header-nav-item--folder:nth-child(4)>a").click(function() { var link = $(this).text(), href = "https://beaverhero.com"; 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 How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
atanasmalamov Posted March 23, 2020 Author Share Posted March 23, 2020 Thank you, Can I ask What is : href = "https://beaverhero.com"; window.location.href=href; Link to comment
tuanphan Posted March 23, 2020 Share Posted March 23, 2020 7 minutes ago, atanasmalamov said: Thank you, Can I ask What is : href = "https://beaverhero.com"; window.location.href=href; replace beaverhero.com with new page url Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
atanasmalamov Posted March 23, 2020 Author Share Posted March 23, 2020 I tried. It is really strange. It works but only the 1st time you load a page and click on it, it opens the new page. but if you click 2nd time on the folder it opens the other page. Link to comment
tuanphan Posted March 23, 2020 Share Posted March 23, 2020 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 How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
atanasmalamov Posted March 23, 2020 Author Share Posted March 23, 2020 Tried. it stopped working at all. I cant believe, there is no simple solution for something seemingly so simple Link to comment
tuanphan Posted March 23, 2020 Share Posted March 23, 2020 5 hours ago, atanasmalamov said: Tried. it stopped working at all. I cant believe, there is no simple solution for something seemingly so simple I see the code worked on your site. Try clearing your browser cache. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
atanasmalamov Posted March 23, 2020 Author Share Posted March 23, 2020 Same.. It just works once. Link to comment
Andrius Posted April 18, 2020 Share Posted April 18, 2020 Been looking at this forever!! Finally found a solution on this post:https://squarecamp.com/custom-code-tips/how-to-link-folder-navigation-title-to-a-specific-page-on-squarespace-7 Need to add a couple lines of CSS and works like a charm! 👌 Link to comment
Mitchell-OGA Posted April 22, 2020 Share Posted April 22, 2020 I'm having the same issue. I used the one Andrius sent and it seemed to work, but I can't tell since I'm still on the trial and some of the URL requests don't work normally as a live page. Problem: I can't tell since it's the trial, but I might be getting a two page loads. Here's my folder structure: Folder Link Page 1 Page 2 ... Here's what I think is happening: 1. Click on folder and loads first page content. In this case it is a link 2. Makes a second URL request since it's a link 3. Loads desired page. Again, I can't tell if this is what would happen on a paid version, but I'm inconsistently getting two requests by clicking on the folder link. Hack: Couldn't we also set up a redirect from the folder's URL to the desired page/index we want the folder to go to? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.