From d2180f2723b5c33736c2ef33bf81a880215dc326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 4 May 2018 10:27:44 +0300 Subject: [PATCH] Do not render empty menus --- .../Components/Theme/MainNavbar/Menu/Default.cshtml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml index 1dd58ce3b9..16197ddf1f 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml @@ -1,11 +1,16 @@ -@using Volo.Abp.UI.Navigation +@using System +@using Volo.Abp.UI.Navigation @model ApplicationMenu @foreach (var menuItem in Model.Items) { if (menuItem.IsLeaf) { + if (menuItem.Url.IsNullOrEmpty()) + { + continue; + } + }