Custom Tree Controller - Declaring other edit.html
Hello my friends,
I am using Umbraco version 7.5.3.
I've got a Custom Section with custom tree within.
In this tree you can create new "form" nodes.
Forms (With create function)
form1
form2
That works well. Now I need to extend this tree with an other parent-node called "News" like that:
Forms (With create function)
form1
form2
News (With create function)
news1
news2
In my tree controller I've got the following code for adding a node:
if (id == "news")
{
menu.Items.Add<CreateChildEntity, ActionNew>(textService.Localize(ActionNew.Instance.Alias));
menu.Items.Add<RefreshNode, ActionRefresh>(textService.Localize(ActionRefresh.Instance.Alias), true);
}
if (id == "forms")
{
menu.Items.Add<CreateChildEntity, ActionNew>(textService.Localize(ActionNew.Instance.Alias));
menu.Items.Add<RefreshNode, ActionRefresh>(textService.Localize(ActionRefresh.Instance.Alias), true);
}
My problem right now is, that if I click on Create in Umbraco on a "NewsItem" it redirects me always to the edit.html of my forms.
Is there a way to determine the path to my edit.html of my news?
My current projectstructure looks like that
App_Plugins -> Projectname -> BackOffice -> CustomTree -> here ist my edit.html
I would like to have 2 Folders instead like that.
Forms -> edit.html
News -> edit.html
What i tried:
I changed the alias of the added item to = "News/Edit", but it opened it as a dialog(like the common delete window in umbraco) and not as a the common create window of umbraco.
I tried to make a second treecontroller but my backend file structure changed and it didnt looked that good.
Forms->Forms-> Form1, Form2
News -> News-> Form1,Form2
Conclusion.
I want a custom tree in my custom section with 2 parent nodes where it should be able to create different child item (news and forms). Does anyone has a solution?
Thank you for you time and thank you in advance. :)
Custom Tree Controller - Declaring other edit.html
Hello my friends,
I am using Umbraco version 7.5.3.
I've got a Custom Section with custom tree within. In this tree you can create new "form" nodes.
Forms (With create function)
That works well. Now I need to extend this tree with an other parent-node called "News" like that:
Forms (With create function)
News (With create function)
In my tree controller I've got the following code for adding a node:
My problem right now is, that if I click on Create in Umbraco on a "NewsItem" it redirects me always to the edit.html of my forms.
Is there a way to determine the path to my edit.html of my news?
My current projectstructure looks like that
App_Plugins -> Projectname -> BackOffice -> CustomTree -> here ist my edit.html
I would like to have 2 Folders instead like that.
What i tried:
I changed the alias of the added item to = "News/Edit", but it opened it as a dialog(like the common delete window in umbraco) and not as a the common create window of umbraco. I tried to make a second treecontroller but my backend file structure changed and it didnt looked that good.
Forms->Forms-> Form1, Form2
News -> News-> Form1,Form2
Conclusion.
I want a custom tree in my custom section with 2 parent nodes where it should be able to create different child item (news and forms). Does anyone has a solution?
Thank you for you time and thank you in advance. :)
Mfg David
Hi David,
you can change the route which is used for menu items:
With this you should be able to set the path to your edit file. In My example the editCalendar.html is used.
Regards David
is working on a reply...