I noticed a function umbraco.cms.businesslogic.web.Access.GetErrorPage but it looks for "path" as parameter, there is no clear explanation what shall I pass to this one.
Hi. The "Path" is a comma-separated list of node IDs starting from the root node down to the node in question (e.g. "-1,1076,1090"). You can get it by the @path attribute of the node in Xslt or the DynamicNode.Path property in Razor.
How to get Error Page via API?
I am using 4.7.1.1.
When I set up public access I can choose "Error Page". How can I get it via API?
I noticed a function umbraco.cms.businesslogic.web.Access.GetErrorPage but it looks for "path" as parameter, there is no clear explanation what shall I pass to this one.
Anybody has some clue?
Hi. The "Path" is a comma-separated list of node IDs starting from the root node down to the node in question (e.g. "-1,1076,1090"). You can get it by the @path attribute of the node in Xslt or the DynamicNode.Path property in Razor.
Thanks for the information.
I used following statements to get error page associated with current node,
// get current node
DynamicNode currentNode = new DynamicNode(Node.GetCurrent());
// find out the erro page node id of current node
int erroPageNodeId = Access.GetErrorPage(currentNode.Path);
// get Url of error page
string erroPageUrl = library.NiceUrl(erroPageNodeId);
is working on a reply...