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
idintThe Id of the item in the tree, i.e. "1" or "Group1".
parentIdintThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
namestringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameterstringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValueintThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExactstringThe 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".
ignoreInChildPathboolif set to
truethis items name is not part of children urlnode paths.ignoreParentPathboolif set to
truethis 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
idintThe Id of the item in the tree, i.e. "1" or "Group1".
parentIdintThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
namestringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameterstringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValuestringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExactstringThe 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".
ignoreInChildPathboolif set to
truethis items name is not part of children urlnode paths.ignoreParentPathboolif set to
truethis 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
idstringThe Id of the item in the tree, i.e. "1" or "Group1".
parentIdstringThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
namestringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameterstringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValuestringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExactstringThe 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".
ignoreInChildPathboolif set to
truethis items name is not part of children urlnode paths.ignoreParentPathboolif set to
truethis item will not include the parent path structure for its path.
AddNode(UrlDataNode)
Parameters
nodeDataUrlData 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
idstringThe Id of the item in the tree, i.e. "1" or "Group1".
parentIdstringThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
namestringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameterstringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValuestringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExactstringThe 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".
ignoreInChildPathboolif set to
truethis items name is not part of children urlnode paths.ignoreParentPathboolif set to
truethis item will not include the parent path structure for its path.queryStringExactstringThe exact querystring - to override the automatic generated querystring.
ignoreParentQueryStringboolif set to
truethe 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
idstringThe Id of the item in the tree, i.e. "1" or "Group1".
parentIdstringThe parentid of the item, i.e. "0" or "" if a rootnode or i.e. "2" for nodes that has a parent.
namestringThe name of the item, i.e. the name of the page, product or group. Used for this elements name in the resulting URL path.
queryStringParameterstringThe query string parameter for this node, i.e. "ID" or "GroupID".
queryStringValuestringThe query string value for this node, i.e. "1" for a page or "Group1" for a group.
pathExactstringThe 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".
ignoreInChildPathboolif set to
truethis items name is not part of children urlnode paths.ignoreParentPathboolif set to
truethis item will not include the parent path structure for its path.queryStringExactstringThe exact querystring - to override the automatic generated querystring.
ignoreParentQueryStringboolif set to
truethe 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.IncludeInSitemapXmlboolif set to
truethe 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