Try our conversational search powered by Generative AI!

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


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?

Nov 26, 2019 19:45

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

@using EPiServer.Shell.Navigation

Nov 26, 2019 20:06

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:

    <div id="epi-application" @Html.Raw(Html.ApplyPlatformNavigation())>

You could also try replacing ApplyPlatformNavigation with ApplyFullscreenPlatformNavigation located in EPiServer.Shell.Navigation.Internal.

Edited, Nov 26, 2019 20:09

A-ha, yes! Thank you. My actual view had the incorrect method name. I was using

<div @Html.Raw(Html.ApplyFullscreenPlatformNavigation())>
    <!-- Content -->

Which came from one of the code samples in, but the descriptive text above that code sample had the correct method name: @Html.Raw(Html.ApplyPlatformNavigation()).

Thanks for clearing that up!

Nov 26, 2019 20:30

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" />

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.