Class NavigationItem
- Namespace
- Dynamicweb.Frontend.NavigationProviders
- Assembly
- Dynamicweb.dll
Inherit this object to create you own type of Navigation item to be used with a navigation provider.
public abstract class NavigationItem : IEnumerable
- Inheritance
-
NavigationItem
- Implements
- Derived
- Inherited Members
Remarks
For example take a look at NavigationProvider for extending the navigation system.
Properties
AbsoluteLevel
Gets or sets the absolute level.
[AddInName("AbsoluteLevel")]
public int AbsoluteLevel { get; set; }
Property Value
- int
The absolute level.
Active
Gets or sets a value indicating whether this NavigationItem is active.
[AddInName("Active")]
public bool Active { get; set; }
Property Value
- bool
true
if active; otherwise,false
.
AllowClick
Gets or sets a value indicating whether click is allowed.
[AddInName("Allowclick")]
public bool AllowClick { get; set; }
Property Value
- bool
true
if allow click; otherwise,false
.
AreaID
Gets or sets the area ID.
[AddInName("AreaID")]
public int AreaID { get; set; }
Property Value
- int
The area ID.
ChildCount
Gets or sets the child count.
[AddInName("ChildCount")]
public int ChildCount { get; set; }
Property Value
- int
The child count.
ChildNodes
Gets the child nodes.
public List<NavigationItem> ChildNodes { get; }
Property Value
- List<NavigationItem>
The child nodes.
CssClass
Gets or sets the CSS class.
[AddInName("class")]
public string? CssClass { get; set; }
Property Value
- string
The CSS class.
FriendlyHref
Gets or sets the friendly href.
[AddInName("FriendlyHref")]
public string? FriendlyHref { get; set; }
Property Value
- string
The friendly href.
Href
Gets or sets the href.
[AddInName("Href")]
public string? Href { get; set; }
Property Value
- string
The href.
ID
Gets or sets the ID.
[AddInName("ID")]
public int ID { get; set; }
Property Value
- int
The ID.
Image
Gets or sets the image.
[AddInName("Image")]
public string? Image { get; set; }
Property Value
- string
The image.
ImageActive
Gets or sets the image active.
[AddInName("ImageActive")]
public string? ImageActive { get; set; }
Property Value
- string
The image active.
ImageMouseOver
Gets or sets the image mouse over.
[AddInName("ImageMouseOver")]
public string? ImageMouseOver { get; set; }
Property Value
- string
The image mouse over.
InPath
Gets or sets a value indicating whether node is in path.
[AddInName("InPath")]
public bool InPath { get; set; }
Property Value
- bool
true
if in path; otherwise,false
.
IsPage
Gets a value indicating whether this instance is PageNavigationItem.
public bool IsPage { get; }
Property Value
- bool
true
if this instance is PageNavigationItem; otherwise,false
.
IsRoot
Gets a value indicating whether this instance is RootNavigationItem.
public bool IsRoot { get; }
Property Value
- bool
true
if this instance is RootNavigationItem; otherwise,false
.
LastInLevel
Gets or sets a value indicating whether node is last in level.
[AddInName("LastInLevel")]
public bool LastInLevel { get; set; }
Property Value
- bool
true
if last in level; otherwise,false
.
MenuText
Gets or sets the menu text.
[AddInName("MenuText")]
public string? MenuText { get; set; }
Property Value
- string
The menu text.
MouseOver
Gets or sets the mouse over.
[AddInName("MouseOver")]
public string? MouseOver { get; set; }
Property Value
- string
The mouse over.
NavigationItemType
Gets or sets the type of navigation item.
[AddInName("Type")]
public NavigationItem.ItemType NavigationItemType { get; set; }
Property Value
- NavigationItem.ItemType
The type of navigation item.
NavigationTag
Gets or sets the navigation tag.
[AddInName("NavigationTag")]
public string? NavigationTag { get; set; }
Property Value
Parent
Gets or sets the parent.
public NavigationItem? Parent { get; set; }
Property Value
- NavigationItem
The parent.
RelativeLevel
Gets or sets the relative level.
[AddInName("RelativeLevel")]
public int RelativeLevel { get; set; }
Property Value
- int
The relative level.
ShowInLegend
Gets or sets a value indicating whether [show in legend].
[AddInName("ShowInLegend")]
public bool ShowInLegend { get; set; }
Property Value
- bool
true
if [show in legend]; otherwise,false
.
ShowInSiteMap
Gets or sets a value indicating whether [show in site map].
[AddInName("ShowInSitemap")]
public bool ShowInSiteMap { get; set; }
Property Value
- bool
true
if [show in site map]; otherwise,false
.
Sort
Gets or sets the sort.
[AddInName("Sort")]
public int Sort { get; set; }
Property Value
- int
The sort.
Title
Gets or sets the title.
[AddInName("Title")]
public string? Title { get; set; }
Property Value
- string
The title.
Methods
AddChild(NavigationItem)
Adds the child.
public void AddChild(NavigationItem child)
Parameters
child
NavigationItemThe child.
GetEnumerator()
Returns an enumerator that iterates through a collection.
public IEnumerator GetEnumerator()
Returns
- IEnumerator
An IEnumerator object that can be used to iterate through the collection.
MakeXmlNavigation(XmlElement, bool)
Makes the XML from the provider.
public void MakeXmlNavigation(XmlElement parentElement, bool optimize)
Parameters
parentElement
XmlElementThe parent element.
optimize
boolif set to
true
[optimize].
SetInPath(NavigationItem, bool)
protected void SetInPath(NavigationItem activeItem, bool isActiveItem)
Parameters
activeItem
NavigationItemisActiveItem
bool
SetPathToHere(bool)
Sets the path to here.
public void SetPathToHere(bool isActiveItem)
Parameters
isActiveItem
boolif set to
true
[is active item].
SetPathToHere(bool, int)
public void SetPathToHere(bool isActiveItem, int pageId)