User experience improvements
This commit is contained in:
27
Oqtane.Client/Themes/Controls/Theme/MenuItemsBase.cs
Normal file
27
Oqtane.Client/Themes/Controls/Theme/MenuItemsBase.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
using Oqtane.Models;
|
||||
using Oqtane.UI;
|
||||
|
||||
namespace Oqtane.Themes.Controls
|
||||
{
|
||||
public abstract class MenuItemsBase : MenuBase
|
||||
{
|
||||
[Parameter()]
|
||||
public Page ParentPage { get; set; }
|
||||
|
||||
[Parameter()]
|
||||
public IEnumerable<Page> Pages { get; set; }
|
||||
|
||||
protected IEnumerable<Page> GetChildPages()
|
||||
{
|
||||
return Pages
|
||||
.Where(e => e.ParentId == ParentPage?.PageId)
|
||||
.OrderBy(e => e.Order)
|
||||
.AsEnumerable();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user