How to Update Navigation Menu in HubSpot Content Staging

  • read
How to Update Navigation Menu in HubSpot Content Staging

When using content staging in HubSpot you can easily test and preview design changes but the menu does not update to use the new staging domain. So you have to preview each page individually. This can be an issue when you are working on a HubSpot website rebrand and the client needs to click through the site.

The code below checks if you are visiting a sandbox environment. If you are, it then changes the menu links to match the sandbox domain. Be sure to update the domain in the code with your domain.

 


Written by: Jacob Lett, a website designer & developer who creates HubSpot CMS themes and writes web design & marketing books to help marketers, designers, and web developers grow their businesses. This blog is my own personal journal and source to help others through some challenges I have faced.
Connect on LinkedIn


Category: Code Snippets
Tags: , ,