Jump to content

How do I link a folder title within the navigation to a page?

Recommended Posts

  • 1 month later...
  • Replies 42
  • Views 69.8k
  • Created
  • Last Reply
  • 4 weeks later...
  • 2 months later...
  • 1 month later...
  • 1 month later...

@bobvonelgg

This is a really great solution and I got everything changed in my navigation bar only to find that it really caused problems on my mobile navigation menu.

All of the folders that originally displayed like this "+ start here" have now broken into two lines which requires you to click on the "+" if you want to access the submenu and the "start here" if you want to get to the unlinked page. Would you have any idea of how to resolve this issue?

Link to comment
  • 10 months later...
  • 4 weeks later...

Hi, thanks for this. It seems to be working well for me but I have one problem: The font weight is now different to the rest of the navigation buttons, and I can't change it in the style editor. DO I need some CSS for this? Any help would be much appreciated.Thanks, Rob.

Link to comment
  • 3 weeks later...
  • 2 months later...

To remove the spacing, add an id to the link.


<a id="navigation-folder-hack" href="/company">Company</a>

Use css and alter the margin. This will cause problems in the mobile navigation. So to avoid this, in the mobile css, add the margin back and make the anchor tag inline.


//remove extra spacing from added link to folder
#navigation-folder-hack {
 margin-left: -30px;
}

@media only screen and (max-width: 640px) { 

//fix navigation-folder-hack for mobile
#navigation-folder-hack {
 margin-left: 0px;
 display:inline !important;
}
}








Link to comment
  • 1 month later...

Here's one way to solve this:

  1. Open the folder's settings/configuration window (click its gear icon in the Pages panel).
  2. In the Navigation Title field, paste in:
    <a href="/PAGESLUG">NAME</a>

  3. Replace PAGESLUG with the slug for the page you want to link to. (Make sure the / is included.)
  4. Replace NAME with what you want the folder's nav link to say.

So for example, if you want the navigation link for your About folder to link to the first page in the folder, which has the page slug /contact-page, it would look like this:

alt text

I've done some testing and this works in most template families but not Aviator, Bedford, or Pacific.

In some templates it works but interferes a bit with the folder functionality. For example, in Skye the folder is collapsed, and you have to click the folder to see the pages. With this modification, people can still click the + icon to see the sub-pages, but if people just click the folder link they'll never see the the folder menu. For the same reason it might not work on mobile in some templates. Personally I'd only use this in templates where you can see the menu on hover, or the menu is permanently expanded. There's a guide that shows folder behavior by template here.

screen-shot-2018-04-05-at-21446-pm.png.9d9072836fcf29d6baf407e121339cb5.png

Link to comment
  • 1 month later...

I use the Foster template part of (Bedford), follow the initial instructions except (slug name) leave as is and it works! If you try to rename it'll give you an error message that says the name is taken.

Link to comment
  • 1 year later...
Guest ssandh

Thank you! This works to create a link; however, it also places a weird space in front of the folder I turn into a link. How can I avoid/remove this space?

Link to comment

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • 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.