Hi all.
Using Umbraco 7.6.5
I am playing around with Custom Sections, and are stuck trying to set the route path.
if i set the route path to myCustomSection/settings/edit/1 it will try and take the edit.html from /View/settings/edit.html, how can i change it to take from /App_Plugins/MyPlugin/backoffice/settings/edit.html ?
Here is an exsampel.
// Let's say my tree alias is Parent.
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
{
if (id == "-1")
{
var rootNodes = new TreeNodeCollection();
// This one takes the view correct at /App_Plugins/MyPlugin/backoffice/parent/edit.html
var folder = CreateTreeNode("0", "-1", queryStrings, "Parent", "icon-truck color-blue", true);
rootNodes.Add(folder);
return rootNodes;
}
else
{
switch (id)
{
case "0":
var childNodes = new TreeNodeCollection();
// This one trying to get /View/settings/edit.html
var settings = CreateTreeNode("1", "0", queryStrings, "Settings", "icon-settings-alt color-blue", false, "myCustomSection/settings/edit/1");
childNodes.Add(settings);
// This one trying to get /View/child/edit.html
var anotherChild = CreateTreeNode("1", "0", queryStrings, "anotherChild", "icon-untitled color-blue", false, "myCustomSection/child/edit/1");
childNodes.Add(anotherChild);
return childNodes;
}
}
//this tree doesn't suport rendering any more levels
throw new NotSupportedException();
}
Any help is appreciated.