|Number of votes:||3|
In 11.21.1, CMS UI will receive a new navigation menu, but other products and add-ons will need to opt-in to the new menu. There is one exception: if you are using the default Bootstrapper directly, without wrapping it in your own implementation, your add-on will follow the lead of the CMS UI and switch to the new navigation.
If you're implementing the navigation for the first time instead of upgrading, check out our Extending the navigation documentation.
The first step is to replace the old navigation with the new one in your view. Switch @Html.Raw(Html.GlobalMenu()) out for @Html.Raw(Html.CreatePlatformNavigationMenu())
The new navigation has a fixed position so that it will always be visible, even when scrolling. In order to prevent your content from ending up behind the navigation, you'll need to add @Html.Raw(Html.ApplyPlatformNavigation()) to the container element for your content.
@Html.Raw(Html.CreatePlatformNavigationMenu()) <div @Html.Raw(Html.ApplyFullscreenPlatformNavigation())> <!-- Content --> </div>
The new navigation uses the rem unit for sizing, so if you are changing the root font size from the default (16px), it will be inconsistent with the navigation font size in CMS UI. If you are using Bootstrap, Bootstrap 3 modifies the root font size, but Bootstrap 4 does not.
CMS UI has updated its styling to be more closely aligned with the new navigation. If you are using CMS UI classes, you may get some of the new styling while using the old global menu. If you have your own styling, we suggest updating your styles to match the new menu. We will be updating ux.episerver.com in the near future to provide our new color palette.
If you are an add-on developer, there may be some limitations to consider when opting in to the new menu. These will be addressed in future releases, so if one of them is a blocker for you, you can keep the old global menu until the issue is resolved.