Table of Contents

Class UrlNode

Namespace
Dynamicweb.Frontend.UrlHandling
Assembly
Dynamicweb.dll
Class UrlNode represents a node in the url trees and indexes.
public class UrlNode
Inheritance
UrlNode
Inherited Members

Properties

Children

Gets or sets the children of UrlNode of this node.
public List<UrlNode> Children { get; set; }

Property Value

List<UrlNode>
List of children.

IgnoreInChildPath

Gets or sets a value indicating if the name of this item is not part of children urlnode paths.
public bool IgnoreInChildPath { get; set; }

Property Value

bool
true if ignored in child paths; otherwise, false.

IgnoreParentPath

Gets or sets a value indicating if the name of this item will not include the parent path structure for its path.
public bool IgnoreParentPath { get; set; }

Property Value

bool
true if ignore parent path; otherwise, false.

IgnoreParentQuerystring

[Obsolete("Use IgnoreQueryStringOfParent instead.")]
public bool IgnoreParentQuerystring { get; set; }

Property Value

bool

IgnoreQueryStringOfParent

Gets or sets a value indicating if the querystring elements of the parent nodes are ignored. I.e. True for pages, but false for products since they also need their Groups querystring and value.
public bool IgnoreQueryStringOfParent { get; set; }

Property Value

bool
true if ignore parent querystring elements; otherwise, false.

IncludeInSitemapXml

Gets or sets a value indicating if this node should be included in sitemap.xml
public bool IncludeInSitemapXml { get; set; }

Property Value

bool

Parent

Gets or sets the parent UrlNode.
public UrlNode Parent { get; set; }

Property Value

UrlNode
The parent node.

PathExact

Gets or sets the exact path for this node if needed - overwrites the auto generated path to this item with a specific value, i.e. "/MyProduct" instead of "/Products/TheGroup/MyProduct".
public string PathExact { get; set; }

Property Value

string
The exact path.

Remarks

This can be set to any valid URL. i.e. "/MyProduct", "Feed.xml", "MyData.json", "/bikes/mountainbike.html", "/MyPage.aspx?Parameter=value" etc.

PathName

Gets or sets the name of this nodes part of the path.
public string PathName { get; set; }

Property Value

string
The name of the path.

PathNameSanitized

Gets the path name sanitized where i.e. diacritics and illegal characters are removed or replaced.
public string PathNameSanitized { get; }

Property Value

string
Returns the cleaned value of the PathName property - using the SanitizeUrl(string, bool) method.

PathUnique

Gets or sets the unique path of this node after it has been indexed.
public string PathUnique { get; set; }

Property Value

string
This property holds a value after nodes in an index has been indexed and the path of the node is duplicated. I.e if the same url tree have 2 nodes named /home, one will be named /home-1

QueryStringExact

Gets or sets the exact querystring that represent this nodes data.
public string QueryStringExact { get; set; }

Property Value

string
The querystring, i.e. parm=val&parm2=val2 or just parm=val.

Remarks

Cannot not have a leading & or ?

Exceptions

Exception
The specified value cannot start with & or ?. Must be in the format parm=val&parm2=val2

QueryStringParameter

Gets or sets the querystring parameter representing this node. I.e. "ID" for pages or "GroupID" for groups.
public string QueryStringParameter { get; set; }

Property Value

string
The querystring parameter.

QueryStringValue

Gets or sets the querystring value for this node, i.e. "1" for "?ID=1".
public string QueryStringValue { get; set; }

Property Value

string
The querystring value.

Methods

GetPath()

Gets the path of this node based on settings and the nodes location in the url tree.
public string GetPath()

Returns

string
System.String.

Exceptions

Exception
If the UrlTree has a depth of more than 100 this method will return an exception

GetQueryString()

Gets the querystring of this node based on settings and the nodes location in the url tree.
public string GetQueryString()

Returns

string
System.String.

NodeCount()

Returns a count of nodes under this node, not including itself.
public int NodeCount()

Returns

int
System.Int32.
To top