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

CalebGilbert

Member
  • Content Count

    2
  • Joined

  • Last visited

  1. Yep, they cleaned up allowing code injection via the folder UI naming fields, meaning that any HTML input there is now escaped (meaning not included in the final rendered output of the page). As a security practice this is basic backend-development-101 and the development team have surely known about it forever, which leads me to believe that at some point, wayyyy back when, that it was someone's conscious decision to allow the oversight in order to cover up some missing functionality (such as top level links not working). I'm sure they all imagined they would 'circle back' in some future development cycle and fix everything properly 'one day'. So it's great they decided to move on to more accepted security practices for user input areas, but it's very unfortunate that the ultimate outcome was to silently break production websites while still not offering a proper way to have main navigation elements work as expected. Anyway, I digress...
  2. Here's a vanilla Javascript solution that doesn't require importing a jquery file. It works for non-mobile sizes as well as for the mobile menu. You may or may not need to adjust the CSS selectors depending on your own templates configuration (Chrome/Firefox extension can help greatly here if the normal developer tool inspector is not resulting in a successful selector for you), and you definitely will need to paste in your own unique 'folder-toggle-####' to get the mobile menu link to function properly. <script> /* Make link work for collection folder in main nav */ document.querySelector("div#navigation-bottom nav#main-navigation .folder.folder-collection > a").outerHTML = '<a href="/url-for-folder">Name of Folder</a>'; /* Make link work for mobile menu */ document.querySelector("label[for=folder-toggle-5a55a54ce2c483133c584db1]").outerHTML = '<label for="folder-toggle-5a55a54ce2c483133c584db1" class="folder-toggle-label"><a style="display:inline;" href="/url-for-folder">Name of Folder</a></label>'; </script> Rant mode on for a second: all of the solutions above, including this one, are ridiculous from the perspective that folder top level linking should just work across any Squarespace theme. Bonus annoyance points for the fact that everyone's original round of workarounds were silently broken for, in my case, months across multiple client sites by Squarespace updates to production sites. (quite an achievement - an update that doesn't only not fix the original problem but makes sure to screw up anyone's attempt to do so themselves 🤨) Good luck.
×
×
  • Create New...