new cms ui navigation - what namespace is @Html.ApplyFullscreenPlatformNavigation in?

Vote:
 

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?

#210530
Nov 26, 2019 19:45
Vote:
 

The "ApplyPlatformNavigation()" extension is defined in EPiServer.Shell.Navigation.MenuHelper. The class library documentation hasnt caught up to this yet.

@using EPiServer.Shell.Navigation

#210531
Nov 26, 2019 20:06
Vote:
 

You add the navigation menu with (located in EPiServer.Shell.Navigation):

@Html.Raw(Html.CreatePlatformNavigationMenu())

And add the class for correct padding/margin etc with (located in EPiServer.Shell.Navigation):

@Html.Raw(Html.ApplyPlatformNavigation())

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.

#210532
Edited, Nov 26, 2019 20:09
Vote:
 

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: @Html.Raw(Html.ApplyPlatformNavigation()).

Thanks for clearing that up!

#210533
Nov 26, 2019 20:30
Vote:
 

How do you replace the ShellMenu?

We use:
 
<%@ Register TagPrefix="sc" Assembly="EPiServer.Shell" Namespace="EPiServer.Shell.Web.UI.WebControls" %>

<sc:ShellMenu ID="ShellMenu2" runat="server" SelectionPath="/global/mycompany/admin" />

#210540
Edited, Nov 27, 2019 11:01
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.