CMS Development

littlepp
Member

Language option's order keeps moving up

I'm coding a custom language dropdown menu based on the default HubSpot language switcher and I have this problem which I cannot override HubSpot's logic through my codebase.

So my problem is:

1. Currently the chosen language is automatically moved to the top of the list, which I do not want it to work this way.
2. I want the dropdown menu options to stay in their current order without changing when a current language is selected.
Here how I call language switcher to my code:
<ul class="site-header__helper-navi">
<li>
<button class="btn-search-open">
<span class="screen-reader-text">Open search</span>
</button>
<div class="search-modal">
<button class="btn btn-search-close">Close search</button>
{% module "search_input" path="@hubspot/search_input" %}
</div>
</li>
<li>
{% module "module_17256216518301" path="@hubspot/language_switcher", label="language_switcher.module" %}
</li>
</ul>


Link to the demo website where have this language switcher: https://optofidelity-6347010.hs-sites.com/zh-cn

Hopefully I can get some advices from you on this matter

Näyttökuva 2024-09-12 kello 8.16.26.png

0 Upvotes
1 Reply 1
AddaxLab
Member

Language option's order keeps moving up

You can clone the native "Language Switcher" module in Design Manager and modify it.

AddaxLab_0-1726157379494.png

 

 

0 Upvotes