AI OnAI Off
Mar 18, 2021
Apr 27, 2021
CMS UI
Closed, Fixed and tested
1. Add a menuItem like this.
using EPiServer.Shell.Navigation; using System; using System.Collections.Generic; using System.Linq; using System.Web;namespace EpiserverFull.Business.Rendering { [MenuProvider] public class DropdownMenuProvider : IMenuProvider { const string DropdownMenuPath = MenuPaths.Global + "/customDropdownMenu"; public IEnumerable<MenuItem> GetMenuItems() { var menuItems = new List<MenuItem>(); var userMenu = new DropDownMenuItem("Episerver blogs", DropdownMenuPath) { SortIndex = SortIndex.Last - 20, Alignment = MenuItemAlignment.Right }; menuItems.Add(userMenu); menuItems.Add(new UrlMenuItem("CMS", DropdownMenuPath + "/item1", "https://world.episerver.com/blogs/?type=cmsblog&page=1") { SortIndex = 1, }); menuItems.Add(new UrlMenuItem("Commerce", DropdownMenuPath + "/item2", "https://world.episerver.com/blogs/?type=commerceblog&page=1") { SortIndex = 2, }); menuItems.Add(new UrlMenuItem("Find", DropdownMenuPath + "/item3", "https://world.episerver.com/blogs/?type=findblog&page=1") { SortIndex = 3, }); return menuItems; } } }
2. Go to edit view to check.
Expected result:
The menu is not broken.
Actual result:
The menu is a little off if you check the images below: