Nucleus .Net Core CMS

Models.PageMenu Class

Namespace: Nucleus.Abstractions.Models
Assembly: Nucleus.Abstractions.dll
Represents a page and its children, used by menu controls.

Constructor

Nucleus.Abstractions.Models.PageMenu Constructor

Nucleus.Abstractions.Models.PageMenu (Page page, IEnumerable<PageMenu> children, Boolean hasChildren)
Create a PageMenu instance
Parameters
Name Type
page Nucleus.Abstractions.Models.Page
children System.Collections.Generic.IEnumerable<Nucleus.Abstractions.Models.PageMenu>
hasChildren Boolean

Properties

Page Property

Reference to the page.

Children Property

List of the page's children.

HasChildren Property

Flag indicating whether the page represented by this PageMenu has child pages.

Methods

UpdateChildren (IEnumerable<PageMenu>,Boolean) Method

UpdateChildren (IEnumerable<PageMenu> children, Boolean hasChildren)
Update the children of this instance.
Parameters
Name Type
children System.Collections.Generic.IEnumerable<Nucleus.Abstractions.Models.PageMenu>
hasChildren Boolean

IsTopLevel

IsTopLevel ()
Gets whether this instance represents the "top level".
Returns
True, if this instance represents the top level, or false otherwise.