Table of Contents

Class XmlNavigation

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll
Represents the navigation object used to generate the xml for navigations
public class XmlNavigation
Inheritance
XmlNavigation
Inherited Members

Examples

Dim xmlNav As New Frontend.XmlNavigation(PageView)
    xmlNav.AbsolutePath = True
    xmlNav.UrlEncode = True
    Return xmlNav.XML(0, 1, 99, Frontend.XmlNavigation.Expand.All)

Constructors

XmlNavigation()

Initializes a new instance of the class.
public XmlNavigation()

XmlNavigation(PageView)

Initializes a new instance of the class.
public XmlNavigation(PageView pageView)

Parameters

pageView PageView
The pageview object.

XmlNavigation(PageView, string)

Initializes a new instance of the class.
public XmlNavigation(PageView pageView, string navigationName)

Parameters

pageView PageView
The pageview object.
navigationName string
Name of the navigation.

Properties

AbsolutePath

Gets or sets a value indicating whether the urls inlcudes the protocol and hostname.
public bool AbsolutePath { get; set; }

Property Value

bool
true if paths are absolute; otherwise, false.

AreaID

Gets or sets the area ID.
public int AreaID { get; set; }

Property Value

int
The area ID.

Include

Gets or sets the include mode. Defines if a pages Include, ShowInLegend and ShowInSitemap are taken into consideration when including nodes in the XML
public XmlNavigation.IncludeMode Include { get; set; }

Property Value

XmlNavigation.IncludeMode
The include mode. Default is 'Default' :-).

LayoutNavigationAttributes

Gets or sets the layout navigation attributes. The navigation attributes is a collection of the attributes set on a UL navigation node in layout templates, and are added to the navigation XML in the NavigationTree/Settings/LayoutNavigationAttributes node with each attribute from the UL as an attribute with value in the XML.
public NameValueCollection LayoutNavigationAttributes { get; set; }

Property Value

NameValueCollection
The layout navigation attributes.

LayoutNavigationSettings

Gets or sets the layout navigation settings. The navigation settings is a collection of the settings set on a UL navigation node in layout templates, and are added to the navigation XML in the NavigationTree/Settings/LayoutNavigationSettings node with each setting as an attribute with value.
public NameValueCollection LayoutNavigationSettings { get; set; }

Property Value

NameValueCollection
The layout navigation settings as a setting/value colletion.

NavigationName

Gets or sets the name of the navigation.
public string NavigationName { get; set; }

Property Value

string
The name of the navigation.

Sitemap

Gets or sets a value indicating whether this is sitemap.
public bool Sitemap { get; set; }

Property Value

bool
true if sitemap; otherwise, false.

StartLevel

public int StartLevel { get; set; }

Property Value

int

StopLevel

public int StopLevel { get; set; }

Property Value

int

UrlEncode

Gets or sets a value indicating whether the names in the urls should be Dynamicweb.Context.Current.Server.UrlPathEncoded.
public bool UrlEncode { get; set; }

Property Value

bool
true if URL encode; otherwise, false.

XmlDocument

Gets or sets the XML doc.
public XmlDocument XmlDocument { get; set; }

Property Value

XmlDocument
The XML doc.

Methods

GetCustomNavigationProviders()

Returns Custom Navigation Providers Types List
public static List<Type> GetCustomNavigationProviders()

Returns

List<Type>

GetNavigationHtml(NameValueCollection, NameValueCollection)

public static string GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)

Parameters

settings NameValueCollection
attributes NameValueCollection

Returns

string

MakeHrefs(ref string, ref string, Page, string[])

public void MakeHrefs(ref string href, ref string friendlyHref, Page page, string[] @params)

Parameters

href string
friendlyHref string
page Page
params string[]

MakeXml(int, int, int, Expand, int)

Returns a XmlDocument of the page nodes used for navigation
public XmlDocument MakeXml(int parentId, int levelStart, int levelStop, XmlNavigation.Expand expand, int selectedAreaId = 0)

Parameters

parentId int
The parent page ID.
levelStart int
The absolute start level.
levelStop int
The absolute stop level.
expand XmlNavigation.Expand
The expand mode to use.
selectedAreaId int

Returns

XmlDocument
a XmlDocument

Examples

Dim xmlNav As New Frontend.XMLNavigation(PageView)
    xmlNav.AbsolutePath = True
    xmlNav.UrlEncode = True
    Return xmlNav.MakeXml(0, 1, 99, Frontend.XMLNavigation.Expand.All)

XML(int, int, int, Expand, int)

[Obsolete("Use MakeXml instead")]
public XmlDocument XML(int parentID, int levelStart, int levelStop, XmlNavigation.Expand expand, int selectedAreaId = 0)

Parameters

parentID int
levelStart int
levelStop int
expand XmlNavigation.Expand
selectedAreaId int

Returns

XmlDocument
To top