CMS Development

krislim
Participant | Elite Partner
Participant | Elite Partner

Navigation Menu Module Questions

SOLVE

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: https://app.hubspot.com/design-manager/5937210/modules/40927387753?tfid=40922510771

 

0 Upvotes
1 Accepted solution
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Navigation Menu Module Questions

SOLVE

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>

 

Kevin Cornett - Sr. Solutions Architect @ BridgeRev

View solution in original post

1 Reply 1
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Navigation Menu Module Questions

SOLVE

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>

 

Kevin Cornett - Sr. Solutions Architect @ BridgeRev