Design + Coding > Change navigation bar link href

I have implemented the selective display workaround described in this forum. I have two sections in my site and use CSS and pageIDs to hide the section A links in the navigation bar on section B pages and vice versa. Even though SQSP uses a flat root for all page links, I want to show a simple hierarchy to distinguish the two sections. This is easy to implement for hidden pages shown in sidebar sections using shortcut URLs. However, the shortcuts do not seem to work for links in the navigation bar itself. I have not found any way to override the default href created by SQSP. Any suggestions?

11.3.2009 | Unregistered CommenterJoel Ginsparg

Joel,

If you post a link to your site, someone here can take a look at your code. Without seeing the site and the code, it's much harder to offer suggestions.

--Chris

11.3.2009 | Registered CommenterChris Loosley

Chris,

Thanks. The URL is: http://firelightcapital.squarespace.com.

I appreciate your help!

Joel

11.4.2009 | Unregistered CommenterJoel Ginsparg

Joel,

OK, maybe it's just that it's late and I'm tired, but I just looked at your site and your CSS code and I don't immediately see what you are referring to. I do see that there is a lot of custom CSS!

Can you point to one specific example of the code that is not working the way you want.
--Chris

11.5.2009 | Registered CommenterChris Loosley

Chris,

Thanks for looking at my site. If you go to the Advisor's side of the site and go to the consulting page you will see a sidebar with links to hidden pages. If you click on the link to the Marketing page, for example, you will go to that page and you will see in the browser bar the URL .../fca/marketing instead of /fcamarketing. That is because I created a URL shortcut that implements that substitution. However, if you click on any of the links in the navigation bar on either side of the site, in spite of the fact that I have also created URL shortcuts for all pages, the URL in the browser bar is the flat URL that SQSP originally creates. For instance, on the Advisor side Consulting page, the URL that is shown is /fcaconsulting. I want it to show as /fca/consulting which is the URL shortcut I created.

To restate the problem, I can't get the system to allow me to use the URL shortcuts for the links in the navigation bar.

Sorry for the long winded response but I thought a detailed explanation might help.

Joel

11.5.2009 | Unregistered CommenterJoel Ginsparg

Chris,

I solved my problem. I moved all of the pages from both sides of the site to the hidden section. I then created a new page in the visible section for each of the pages I moved and made them single link pages. I used the shortcut URL as the URL in the link on the configuration page. Now the links in the navigation bar are the shortcut URLs and clicking the links launches the hidden pages. The shortcut URL is visible in the browser bar. The only extra task I needed to complete was to add a CSS statement for each page to make the new link on the navigation bar active when the linked-to page is active.

An unusual workaround but it works. This enables you to create a virtual file hierarchy for all pages even though SQSP has a flat architecture. The real product solution is for SQSP to simply allow you to enter the shortcut URL on the configuration box for HTML pages. Maybe they will add this to the requested features list.

Thanks for taking the time to look at my site.

Joel

11.5.2009 | Unregistered CommenterJoel Ginsparg

Hi Joel,

I was just looking at this again. Are you in the process of changing it?

I was looking at the source code, and the nav bar links appear to have changed from the flat format to hierarchical format (with full URL) during the last 15 minutes. Also all those links are now showing up (i.e links for both "sides" of your site), so my guess is that you have created new link elements in the horizontal nav which are therefore not being hidden by your CSS code, because the id's have changed. Is that right?

Anyway, I am going to assume that you are recoding the horizontal nav, and I'm just going to wait until you come back here with another question!

--Chris

11.5.2009 | Registered CommenterChris Loosley

Aha!!

I see we were both typing these messages at the same time. No problem. Glad you are getting it working.

--Chris

11.5.2009 | Registered CommenterChris Loosley