The "ApplyPlatformNavigation()" extension is defined in EPiServer.Shell.Navigation.MenuHelper. The class library documentation hasnt caught up to this yet.
You add the navigation menu with (located in EPiServer.Shell.Navigation):
And add the class for correct padding/margin etc with (located in EPiServer.Shell.Navigation):
And put together:
@Html.Raw(Html.ShellInitializationScript()) @Html.Raw(Html.CreatePlatformNavigationMenu()) <div id="epi-application" @Html.Raw(Html.ApplyPlatformNavigation())> @RenderBody() </div>
You could also try replacing ApplyPlatformNavigation with ApplyFullscreenPlatformNavigation located in EPiServer.Shell.Navigation.Internal.
A-ha, yes! Thank you. My actual view had the incorrect method name. I was using
<div @Html.Raw(Html.ApplyFullscreenPlatformNavigation())> <!-- Content --> </div>
Which came from one of the code samples in https://world.episerver.com/blogs/ryan-bare/dates/2019/7/new-cms-ui-navigation/, but the descriptive text above that code sample had the correct method name:
Thanks for clearing that up!
How do you replace the ShellMenu?
<%@ Register TagPrefix="sc" Assembly="EPiServer.Shell" Namespace="EPiServer.Shell.Web.UI.WebControls" %>
<sc:ShellMenu ID="ShellMenu2" runat="server" SelectionPath="/global/mycompany/admin" />
I have a custom page I'm adding to the Episerver UI, and I'm following the guides for implementing the new "blue" UI / navigation:
But I'm getting an error when I reference this extension method: @Html.Raw(Html.ApplyPlatformNavigation()). What using statement should I have in my view (or in web.config) for this?