diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageLayout.cs b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageLayout.cs index fc7d372b37..dc51022956 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageLayout.cs +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageLayout.cs @@ -31,6 +31,8 @@ public class PageLayout : IScopedDependency, INotifyPropertyChanged } } + public bool ShowToolbar { get; set; } = true; + public virtual ObservableCollection BreadcrumbItems { get; } = new(); public virtual ObservableCollection ToolbarItems { get; } = new(); diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Layout/ContentLayout.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Layout/ContentLayout.cs index 1e5abce611..533a5b9187 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Layout/ContentLayout.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Layout/ContentLayout.cs @@ -11,6 +11,8 @@ public class ContentLayout public string? MenuItemName { get; set; } + public bool ShowToolbar { get; set; } = true; + public ContentLayout() { BreadCrumb = new BreadCrumb(); @@ -23,11 +25,6 @@ public class ContentLayout return true; } - if (BreadCrumb.ShowCurrent && !Title.IsNullOrEmpty()) - { - return true; - } - - return false; + return BreadCrumb.ShowCurrent || BreadCrumb.ShowHome; } }