Jump to content


Circle Member
  • Posts

  • Joined

  • Last visited

Everything posted by GraeMedia

  1. Update: I found a very helpful custom code from https://www.will-myers.com/articles/clickable-folders-for-squarespace-71 See below - optional: remove extra link on mobile In the code below, remove the function call on line 33, addToMobile(folder). This will prevent the mobile link from being added. <script> (function () { let folders; function createEventListener(e) { let href = e.target.href.replace("-folder/", ""); window.open(href, "_self"); } function addToMobile(folder) { let href = folder.getAttribute("href"), hrefAdjusted = href.replace("-folder/", ""), text = folder.innerText, mobileFolder = document.querySelector(`[data-folder="${href}"]`), backButton = mobileFolder.querySelector(".header-menu-nav-folder-content > *:first-of-type"); //If it exists already if (mobileFolder.querySelector(`[href="${href}"]`)) return; let newLinkContainer = document.createElement("div"), newLink = `<a href="${hrefAdjusted}" tabindex="0">All ${text}</a>`; newLinkContainer.classList = "container header-menu-nav-item header-menu-nav-item--external"; newLinkContainer.innerHTML = newLink; insertAfter(newLinkContainer, backButton); } /* Select All Folder Links & */ function setFolderLinks() { folders = document.querySelectorAll('.header-display-desktop .header-nav-folder-title[href*="-folder/"]'); for (folder of folders) { addToMobile(folder); folder.addEventListener("click", createEventListener); } } /* Insert After Helper Function */ function insertAfter(newNode, existingNode) { existingNode.parentNode.insertBefore(newNode, existingNode.nextSibling); } setFolderLinks(); })(); </script>
  2. Trying to make a menu folder clickable and have not been able to find this setting in 7.1 (IE someone clicks the folder name rather than a page item within it). I'm having a really hard time believing that this isn't suppored by default and required custom code to enable, but everyting seems to point in that direction. How can that possibly be...? This needs to be an option on the folder settings page asap, but in the meantime, need a workaround. Any help is appreciated.
  • 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.