krislim
February 15, 2021, 2:30pm
1
Hi, I have created a header module, but i m not sure what field should i put in to replace the <dd> tag, e.g.
<dd>
<a href=“http://www.xxxxxx.hs-sites.com/en-pk/patients-families/ ”>
<span>Patients families</span>
</a>
</dd>
Can anyone provide some suggestions about this case? Highly appreciated! Thank you:)
I wish the menu will able to be changed at the Settings>Website>Navigation, because the theme I have created will be applied for different countries’ site (thus there will be varies language menu), therefore i hope the menu options can be changed from the Navigation Menu.
Module Name: _Testing_Header
Link: Design Manager | HubSpot
Kevin-C
February 15, 2021, 6:03pm
2
Hey @krislim
To be able to modify the menu’s contents from the navigation UI you need to use the menu tag.
{% menu id="123" %}
If you would like to choose the menu via the content manager you need to create a menu field and use the value in the id parameter:
{% menu id="{{ module.menu_field }}" %}
See documentation for the tag above at this link.
The html that will be created for you will look something like this:
<span id="hs_cos_wrapper_module_XXXX" class="hs_cos_wrapper hs_cos_wrapper_widget hs_cos_wrapper_type_menu" style="" data-hs-cos-general-type="widget" data-hs-cos-type="menu">
<div id="hs_menu_wrapper_module_XXXX" class="hs-menu-wrapper active-branch flyouts hs-menu-flow-horizontal" role="navigation" data-sitemap-name="default" data-menu-id="XXXX" aria-label="Navigation Menu">
<ul>
<li class="hs-menu-item hs-menu-depth-1">
<a href="url" role="menuitem">text</a>
</li>
<li class="hs-menu-item hs-menu-depth-1">
<a href="url" role="menuitem">text</a>
</li>
</ul>
</div>
</span>