Class UrlTreeBuilder
- Namespace
- Dynamicweb.Frontend.Url
Handling
- Assembly
- Dynamicweb.dll
UrlTreeBuilder is a helper class for bulding url tree structures.
Url nodes can be created with ID and ParentID structure using the Add(string,
- Inheritance
-
Url
Tree Builder
- Inherited Members
Properties
RootNodes
Gets the root nodes of the Url
Property Value
Methods
Add(int, int, string, string, int, string, bool, bool)
Adds a Url
public void Add(int id, int parentId, string name, string queryStringParameter, int queryStringValue, string pathExact, bool ignoreInChildPath, bool ignoreParentPath)
Parameters
id
intThe Id of the item in the tree, i.e. "1" or "Group1".
parentId
intThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
name
stringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameter
stringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValue
intThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExact
stringThe 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".
ignoreInChildPath
boolif set to
true
this items name is not part of children urlnode paths.ignoreParentPath
boolif set to
true
this item will not include the parent path structure for its path.
Add(int, int, string, string, string, string, bool, bool)
Adds a Url
public void Add(int id, int parentId, string name, string queryStringParameter, string queryStringValue, string pathExact, bool ignoreInChildPath, bool ignoreParentPath)
Parameters
id
intThe Id of the item in the tree, i.e. "1" or "Group1".
parentId
intThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
name
stringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameter
stringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValue
stringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExact
stringThe 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".
ignoreInChildPath
boolif set to
true
this items name is not part of children urlnode paths.ignoreParentPath
boolif set to
true
this item will not include the parent path structure for its path.
Add(string, string, string, string, string, string, bool, bool)
Adds a Url
public void Add(string id, string parentId, string name, string queryStringParameter, string queryStringValue, string pathExact, bool ignoreInChildPath, bool ignoreParentPath)
Parameters
id
stringThe Id of the item in the tree, i.e. "1" or "Group1".
parentId
stringThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
name
stringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameter
stringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValue
stringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExact
stringThe 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".
ignoreInChildPath
boolif set to
true
this items name is not part of children urlnode paths.ignoreParentPath
boolif set to
true
this item will not include the parent path structure for its path.
AddNode(UrlDataNode)
Parameters
nodeData
UrlData Node
AddNode(string, string, string, string, string, string, bool, bool, string, bool)
Adds a Url
public void AddNode(string id, string parentId, string name, string queryStringParameter, string queryStringValue, string pathExact, bool ignoreInChildPath, bool ignoreParentPath, string queryStringExact, bool ignoreParentQueryString)
Parameters
id
stringThe Id of the item in the tree, i.e. "1" or "Group1".
parentId
stringThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
name
stringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameter
stringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValue
stringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExact
stringThe 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".
ignoreInChildPath
boolif set to
true
this items name is not part of children urlnode paths.ignoreParentPath
boolif set to
true
this item will not include the parent path structure for its path.queryStringExact
stringThe exact querystring - to override the automatic generated querystring.
ignoreParentQueryString
boolif set to
true
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.
Exceptions
AddNode(string, string, string, string, string, string, bool, bool, string, bool, bool)
Adds a Url
public void AddNode(string id, string parentId, string name, string queryStringParameter, string queryStringValue, string pathExact, bool ignoreInChildPath, bool ignoreParentPath, string queryStringExact, bool ignoreParentQueryString, bool IncludeInSitemapXml)
Parameters
id
stringThe Id of the item in the tree, i.e. "1" or "Group1".
parentId
stringThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
name
stringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameter
stringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValue
stringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExact
stringThe 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".
ignoreInChildPath
boolif set to
true
this items name is not part of children urlnode paths.ignoreParentPath
boolif set to
true
this item will not include the parent path structure for its path.queryStringExact
stringThe exact querystring - to override the automatic generated querystring.
ignoreParentQueryString
boolif set to
true
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.IncludeInSitemapXml
boolif set to
true
the node will be included in sitemap xml, otherwise ignored. Children will still be included
Exceptions
MakeTree()
Makes the tree structure based on the IDs and ParentIds and adds the rootnodes to the RootNodes properties