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
Constructors
XmlNavigation()
Initializes a new instance of the XmlNavigation class.
public XmlNavigation()
XmlNavigation(PageView)
Initializes a new instance of the XmlNavigation class.
public XmlNavigation(PageView pageView)
Parameters
pageView
PageViewThe pageview object.
XmlNavigation(PageView, string)
Initializes a new instance of the XmlNavigation class.
public XmlNavigation(PageView pageView, string navigationName)
Parameters
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 XmlNavigation is sitemap.
public bool Sitemap { get; set; }
Property Value
- bool
true
if sitemap; otherwise,false
.
StartLevel
public int StartLevel { get; set; }
Property Value
StopLevel
public int StopLevel { get; set; }
Property Value
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
GetNavigationHtml(NameValueCollection, NameValueCollection)
public static string GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)
Parameters
settings
NameValueCollectionattributes
NameValueCollection
Returns
MakeHrefs(ref string, ref string, Page, string[])
public void MakeHrefs(ref string href, ref string friendlyHref, Page page, string[] @params)
Parameters
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
intThe parent page ID.
levelStart
intThe absolute start level.
levelStop
intThe absolute stop level.
expand
XmlNavigation.ExpandThe expand mode to use.
selectedAreaId
int
Returns
- XmlDocument
a XmlDocument