Class UrlNode
- Namespace
- Dynamicweb.Frontend.Url
Handling
- Assembly
- Dynamicweb.dll
Class UrlNode represents a node in the url trees and indexes.
- Inheritance
-
Url
Node
- Inherited Members
Properties
Children
Gets or sets the children of Url
Property Value
IgnoreInChildPath
Gets or sets a value indicating if the name of this item is not part of children urlnode paths.
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.
Property Value
- bool
true
if ignore parent path; otherwise,false
.
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.
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
Property Value
Parent
Gets or sets the parent Url
Property Value
- Url
Node 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".
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.
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.
Property Value
- string
Returns the cleaned value of the Path
Name property - using the SanitizeUrl(string, method.bool)
PathUnique
Gets or sets the unique path of this node after it has been indexed.
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.
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.
Property Value
- string
The querystring parameter.
QueryStringValue
Gets or sets the querystring value for this node, i.e. "1" for "?ID=1".
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.
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.
Returns
- string
System.String.
NodeCount()
Returns a count of nodes under this node, not including itself.
Returns
- int
System.Int32.
SetPathName(string, string)
Sets the name of the path and adds an aditional part to the URL. Pathname will be sanitized and normalized for non-url supported characters where the addon will be used exactly as specified and therefore have to be URL compatible.