CMS Development

PTurangan
Member

Top Navigation Menu

SOLVE

Hi all, 

 

We are having issues of our top navigation not being able to change per variation language.

 

For example: at the moment we have a English-US, English-AU & English-UK website all within the same URL. We have different features and service we offer to each region therefore the top navigation needs to be different. Everytime we try to change it sticks to one type of navigation (so we can't add features or edit menu items). Hubspot has informed me that it is due to this hard code here: 

{% set bottom_menu = menu(module.bottom_menu, "site_root").children %}

 

Wondering if there is a work around this? Are we able to change the code ourselves without ruining the whole website?

0 Upvotes
1 Accepted solution
Jnix284
Solution
Hall of Famer

Top Navigation Menu

SOLVE

Hi @PTurangan thank you for the additional information, I can see where you have the correct navigation selected and that the corresponding menu items aren't showing.

 

Two suggestions for triggering this to update:

 

1 - make a change to the advanced navigation (menu) that causes HubSpot to prompt you to save your changes, then revert and save them back.

 

If you add another link to a page that is draft, it won't show on your live page (any menu links with draft status are invisible) but should be enough to trigger the server to recognize a change to the menu.

 

2 - make a change to the Australia header and publish to all assets.

 

Between the two of these, it should be enough to trigger your change to show, if it doesn't, then we'll have to dig deeper into the code change HubSpot recommended.

 

Did they provide you with more details about what file the code is contained in within the theme?

 

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon

View solution in original post

12 Replies 12
Anton
Thought Leader | Partner
Thought Leader | Partner

Top Navigation Menu

SOLVE

Hi @PTurangan

{% set bottom_menu = menu(module.bottom_menu, "site_root").children %}

will create an "list" of all of your menu items. 


Why the developer has written it like this is not clear to me. 

 

My assumption is that he set's several menu modules into one "big" list and creates the layout for all of the menus. Haven't seen such an approach yet since in most cases modifying the menu module or creating your own is only needed for extremly complex behaviours or layouts (even mega-menus are technically possible with out-of-the-box options).

 

The good news: you're on a custom theme. This means you can modify everything. 

 

Could you please post your whole header.html or the file this code is in - would be extremly helpful to see the whole header.html (or the file this is located in) so we get a better understanding of the behaviour

 

 

best, 

Anton

 

Anton Bujanowski Signature
PTurangan
Member

Top Navigation Menu

SOLVE

Hi Anton, 

 

Thank you for helping - see screenshot for the page source code: 

Screenshot 2023-10-12 at 7.59.29 am.png

 

Let me know your thoughts!

 

0 Upvotes
Jnix284
Hall of Famer

Top Navigation Menu

SOLVE

Thank you for jumping in @Anton! 🙌


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
PTurangan
Member

Top Navigation Menu

SOLVE

Hi Jennifer, 

 

I've looked into the two and everything is as it should be - all the pages are live and the assets are published. See communication from the hubspot rep when I first contacted them.

 

Dear Pikka

As the module is custom coded, HubSpot Support is limited in the advice we can provide on how to rectify issues in the code, what we can do and have done is to identify the area of the code that is resulting in the issue!

If your team isn't able to edit the code at this time, what I'd recommend is to set the Bottom Menu in the global content editor to AU LineLeader Top Navigation instead.

Alternatively, you can reach out on the Developer's forums to get advice from developers who are well-versed in coding 🙂

Seeking your understanding here!

Best Regards,

Sara

HubSpot Support APAC

0 Upvotes
Jnix284
Hall of Famer

Top Navigation Menu

SOLVE

Thanks for the additional information - maybe @Anton can offer further guidance on how best to modify the code.

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
Jnix284
Hall of Famer

Top Navigation Menu

SOLVE

Hi @PTurangan the answer to your question varies as to whether you've built the website with a custom theme or marketplace theme - and if so, whether you have a child theme configured.

 

Do you have a link to share that has the navigation with the language switcher to test?

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
PTurangan
Member

Top Navigation Menu

SOLVE

Hi Jennifer - it was built on a custom basis with a developer. See link below with the language variation. The one that's currently not working is English-AU.

https://lineleader.com/en-au/

0 Upvotes
Jnix284
Hall of Famer

Top Navigation Menu

SOLVE

Thanks for the link and additional details @PTurangan 

 

The header would likely need to be updated in the coded files as indicated by HubSpot Support.

 

Typically a global header would be developed to allow you to change the content per language variation.

 

When you click on the header from the page editor and open the global header, are you able to see all three language variants? Can you share a screenshot?

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
PTurangan
Member

Top Navigation Menu

SOLVE

Hi Jennifer, 

 

Yes i can see the language variation as an option at the top. We used to be able to switch navigations and we actually launched the website early 2023 with different headers. So i'm not sure what is different now or what has changed.

 

See screenshot here:Screenshot 2023-09-29 at 10.35.12 am.png

 

Let me know what you think!

0 Upvotes
Jnix284
Hall of Famer

Top Navigation Menu

SOLVE

Hi @PTurangan ok great - since you can see the different languages in the global content editor, when you switch to the Australia variant you should have the setting to modify the menu - what settings do you have available when you click the icon on the left sidebar (just below the language dropdown) to reveal the contents?

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon
PTurangan
Member

Top Navigation Menu

SOLVE

Hi @Jnix284 i have the option to update the menu to different navigations created in the settings. The problem is that the menu that i have chosen for English-Australia variation is not matching what i have set up in the settings. See the two screenshots - you should be able to see that in the global content editor "Tour Talking Points" and "Tour Scheduler" are not visible in the editor but it is set up and saved in the settings.Screenshot 2023-10-03 at 9.35.18 am.pngScreenshot 2023-10-03 at 9.34.31 am.png

0 Upvotes
Jnix284
Solution
Hall of Famer

Top Navigation Menu

SOLVE

Hi @PTurangan thank you for the additional information, I can see where you have the correct navigation selected and that the corresponding menu items aren't showing.

 

Two suggestions for triggering this to update:

 

1 - make a change to the advanced navigation (menu) that causes HubSpot to prompt you to save your changes, then revert and save them back.

 

If you add another link to a page that is draft, it won't show on your live page (any menu links with draft status are invisible) but should be enough to trigger the server to recognize a change to the menu.

 

2 - make a change to the Australia header and publish to all assets.

 

Between the two of these, it should be enough to trigger your change to show, if it doesn't, then we'll have to dig deeper into the code change HubSpot recommended.

 

Did they provide you with more details about what file the code is contained in within the theme?

 

 


If my reply answered your question please mark it as a solution to make it easier for others to find.


Jennifer Nixon