GemGem Posted April 16, 2021 Share Posted April 16, 2021 Hi Creedon, yes, very good point. I'm going to have to rename either the folder or the page to make it clearer. Thanks for your insight! Link to comment
RadiusMS Posted April 26, 2021 Share Posted April 26, 2021 (edited) Using @creedon's code from 2/12, I'm seeing the folders being properly mapped to the correct page URL Slug, but clicking on the folders in the header does nothing. What am I doing wrong? Page URL: radiusms.squarespace.com Site Password: 123123 P.S. I'm not sure that I like 7.1. Seems like 7.0 was much more user friendly for those of us that are tech-saavy. Edited April 26, 2021 by RadiusMS Link to comment
creedon Posted April 26, 2021 Share Posted April 26, 2021 (edited) @RadiusMS You did nothing wrong. It appears that SS has changed the underlying code for folder menus. Give me several days to see if I can update the code to work again. If I don't respond in that time frame with a yeah or nay on if the code will work again please bump this thread. Edited April 26, 2021 by creedon RadiusMS 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
creedon Posted April 27, 2021 Share Posted April 27, 2021 @RadiusMS I have updated the cited code post. The new code should restore the click-ability. Let me know how it goes. RadiusMS 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
RadiusMS Posted April 27, 2021 Share Posted April 27, 2021 @creedon That appears to have done the trick. Thanks for your help! creedon 1 Link to comment
JuleeBode Posted April 27, 2021 Share Posted April 27, 2021 I am having the same issue. I was able to get the folder title to link to a page on a desktop version but not on the mobile version. Is there a way that I can do this. KortechFM.com Link to comment
creedon Posted April 28, 2021 Share Posted April 28, 2021 @JuleeBode Please see my Apr 15th post earlier in this thread. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
JuleeBode Posted April 28, 2021 Share Posted April 28, 2021 @creedon, are you telling me that I can't have the folder navigation name clickable to a page, it will just open a new menu for the folder? Link to comment
tuanphan Posted April 28, 2021 Share Posted April 28, 2021 1 hour ago, JuleeBode said: @creedon, are you telling me that I can't have the folder navigation name clickable to a page, it will just open a new menu for the folder? Can you share your site url? 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
JuleeBode Posted April 28, 2021 Share Posted April 28, 2021 @tuanphan www.kortechfm.com Link to comment
creedon Posted April 28, 2021 Share Posted April 28, 2021 (edited) @JuleeBode Menus on desktop and mobile work in fundamentally different ways. By default on desktop the folder itself is not an active link. It is there to hover over with a mouse which activates the folder menu. On mobile there is no concept of hovering with a mouse. So the folder is an active link that you touch and that is how you dive deeper into the folder menu. Could the folder url on mobile be changed? Yes. But that would make inaccessible all the menu items in the folder. Edited January 27, 2022 by creedon Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
joeystephensmusic Posted May 3, 2021 Share Posted May 3, 2021 @tuanphan My URL is www.joeystephensmusic.com. I added your code to make the "Booking" folder clickable in desktop view. So, now I would like the "Booking Info" link under that folder to ONLY appear in the Mobile View, as it is repetitive on the desktop view("booking" goes to booking page and "booking info" also goes to booking page). I'd like my Desktop View to look like... Booking - Client List - Bio ...the mobile view is fine as is... Booking Info Client List Bio Link to comment
tuanphan Posted May 5, 2021 Share Posted May 5, 2021 On 5/3/2021 at 11:35 PM, joeystephensmusic said: @tuanphan My URL is www.joeystephensmusic.com. I added your code to make the "Booking" folder clickable in desktop view. So, now I would like the "Booking Info" link under that folder to ONLY appear in the Mobile View, as it is repetitive on the desktop view("booking" goes to booking page and "booking info" also goes to booking page). I'd like my Desktop View to look like... Booking - Client List - Bio ...the mobile view is fine as is... Booking Info Client List Bio Add to Design > custom CSS /* remove booking info on desktop */ a.header-nav-folder-title[href="/booking"] + div>div:first-child { display: none; } 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
tuanphan Posted May 5, 2021 Share Posted May 5, 2021 On 5/3/2021 at 11:35 PM, joeystephensmusic said: @tuanphan My URL is www.joeystephensmusic.com. I added your code to make the "Booking" folder clickable in desktop view. So, now I would like the "Booking Info" link under that folder to ONLY appear in the Mobile View, as it is repetitive on the desktop view("booking" goes to booking page and "booking info" also goes to booking page). I'd like my Desktop View to look like... Booking - Client List - Bio ...the mobile view is fine as is... Booking Info Client List Bio Also, do you want to improve these? If yes, you can create new question. Site URL – https://www.joeystephensmusic.com/ 1. (Mobile-Products) Show breadcrumb on top? 2. (Mobile-Support Joey) Payment icons look big. Want to reduce size a bit? 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
Flocuss Posted May 31, 2021 Share Posted May 31, 2021 I'd like to make it so that clicking the folder name 'projects' takes you to the first page in the folder - I just have a basic account. Can anyone help with that? Link to comment
creedon Posted May 31, 2021 Share Posted May 31, 2021 @Flocuss You need Javascript to do what you want and that requires the business plan or above. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
sayluv Posted June 6, 2021 Share Posted June 6, 2021 Hi- In my header I have a top level folder "Gallery". Within Gallery is "Picture Gallery" and "Video Gallery". In the old Bedford template the top level "Gallery" was clickable and would automatically take you to the top most level item within that folder, so in this case it would default to "Picture Gallery" or you could level down and manually click on "Picture Gallery". I am making a new website with 7.1 and this no longer works. Support said there was a way to add some code to add this feature back in. Can anyone point me in the right direction? I am not sure where to find what template I am using in 7.1 or if that even matters in this case. Thanks. Link to comment
creedon Posted June 6, 2021 Share Posted June 6, 2021 Please see the following. Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
epete22 Posted June 24, 2021 Share Posted June 24, 2021 Whats the correct script to use to make a folder clickable on 7.0? Erik Link to comment
creedon Posted June 25, 2021 Share Posted June 25, 2021 @epete22 Please post the URL for your site. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
epete22 Posted June 25, 2021 Share Posted June 25, 2021 1 hour ago, creedon said: @epete22 Please post the URL for your site. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. We can then take a look at your issue. wearegenerous.agency I tried the 7.0 script but don't think I did it correctly. The folder page title is 'How We Help' with the url 'services' and the page it needs to link to is 'services overview' with the url 'services-overview' <script> $( ( ) => { /* begin make navigation folders clickable SS Version : 7.0 Template : Marquee template family */ const folderNavigationTitleUrlMappings = { /* the format of each line is the folder page Navigation Title and the URL for the folder for each folder page copy value from Folder Settings > General > NAVIGATION TITLE field. you only need exactly what can be selected from the field */ // '[enter folder page navigation title here]' : '[enter url here]', ‘How We Help : ‘/services, // last or only item doesn't get a comma at end of line ‘Services overview’ : '/services-‘overview } // do not change anything below, there be the borg here $( '.main-nav .folder-parent > a' ).each ( function ( ) { let $this = $( this ); const folderNavigationTitle = $this.text ( ); const url = folderNavigationTitleUrlMappings [ folderNavigationTitle ]; if ( url == undefined ) return true; $this.attr ( 'href', url ); } ); // end make navigation folders clickable } ); </script> Link to comment
creedon Posted June 25, 2021 Share Posted June 25, 2021 @epete22 The reason the code doesn't work is it was designed for the Marquee template family. You site uses the Brine template family. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
epete22 Posted June 25, 2021 Share Posted June 25, 2021 1 hour ago, creedon said: @epete22 The reason the code doesn't work is it was designed for the Marquee template family. You site uses the Brine template family. Well that makes sense, any suggestions on what to do? Link to comment
nicolettely Posted July 1, 2021 Share Posted July 1, 2021 On 4/8/2021 at 12:42 AM, creedon said: I have updated my Feb. 12th code post. If your current code for a v7.1 is working there is no need to update. The main change to the code is the option to not specify any mappings and the code will automatically make the folder link point to the first page in the folder. Hi @creedon! Its very kind of you to help us all with this! I appreciate your time. I'm having some trouble...I'm not specifying URLS, just hoping the folder title links to the first page within it. Heres my Header code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <link href="https://assets.codepen.io/3198845/WMSlider121520v3.2.14.min.css" rel="stylesheet"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> Heres the footer (minus the Squarekicker code): <script> /* begin make navigation folder URL Slugs clickable Version : 0.5d2 SS Version : 7.1 Dependancies : jQuery By : Thomas Creedon < http://www.tomsWeb.consulting/ > */ $( ( ) => { const folderToPageUrlSlugMap = { } // do not change anything below, there be the borg here if ( ! Object.keys ( folderToPageUrlSlugMap ).length ) { $( '.header-nav-folder-title' ).each ( function ( ) { const $this = $( this ); const key = $this .attr ( 'href' ) .slice ( 1 ); let url = $this .next ( ) .find ( '.header-nav-folder-item:first a' ) .attr ( 'href' ); if ( url === undefined ) return true; url = url.slice ( 1 ); folderToPageUrlSlugMap [ key ] = url; } ); } const keys = Object.keys ( folderToPageUrlSlugMap ); $.each ( keys, function ( i, key ) { let url = folderToPageUrlSlugMap [ key ]; if ( ! url.includes ( '://' ) ) url = '/' + url; $( '.header-nav-folder-title[href="/' + key + '"]' ).each ( function ( ) { $( this ) .attr ( 'href', url ) .click ( function ( ) { location.href = $( this ).attr ( 'href' ); } ); } ); } ); // end make navigation folder URL Slugs clickable } ); </script> <script src="https://assets.codepen.io/3198845/WMSlider121520v3.2.14.min.js"></script> <!-- Summary Block Autoplay --> <script> setInterval(click, 10000); function click() { $(".summary-carousel-pager-next").click(); } </script> <!-- SquareKicker.com | Extension | START --><script> if (window.self !== window.top && window.top.Static.SQUARESPACE_CONTEXT.authenticatedAccount) { var sk = document.createElement('script'); sk.type = 'text/javascript'; sk.id = "squarekicker"; sk.src = "https://extension.squarekicker.com/kicker.js"; sk.dataset.sktoken = "923961ec9ccde33aed8916d305991915"; document.querySelector('head').appendChild(sk); } Link to comment
creedon Posted July 1, 2021 Share Posted July 1, 2021 @nicolettely I don't think this is an issue with the code working but you may want to remove the following lines from code injection header. <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> In general you only need 1 copy of jQuery loaded. As to your issue. Please post the URL for your site. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment