I need to create a new section in the left main menu. At the moment I have created a folder in the App_Plugins – and added (amongst other things) a TreeController with 3 TreeNodes (see attached image).
My question/problems is – each of those 3 TreeNodes (which I have created manually in the TreeController) needs to have some children which should be stored in db. How do I do that? Should I do it through the ContentService (eventhough it is not content – and should not have a public URL)?
It's probaply possible to save them as umbraco-nodes, but then they would also be displayed in the content-section and editors would be able to change them.
Also you can add meta-data like id's, to create a hierarchy, without displaying them to the users.
You have to create an editor for your custom-section anyway. I don't think it's possible to reuse the one from the content section.
How to create nodes in a new section
Hi
I need to create a new section in the left main menu. At the moment I have created a folder in the App_Plugins – and added (amongst other things) a TreeController with 3 TreeNodes (see attached image).
My question/problems is – each of those 3 TreeNodes (which I have created manually in the TreeController) needs to have some children which should be stored in db. How do I do that? Should I do it through the ContentService (eventhough it is not content – and should not have a public URL)?
Any place I can read about this?
You could add your own database-table via peta-poco. It's easy to find examples.
I was a bit in doubt if I should somehow save them in the umbracoNode table - but you would recommend to create their own table using peta-poco?
I have used petapoco in the past.
It's probaply possible to save them as umbraco-nodes, but then they would also be displayed in the content-section and editors would be able to change them. Also you can add meta-data like id's, to create a hierarchy, without displaying them to the users.
You have to create an editor for your custom-section anyway. I don't think it's possible to reuse the one from the content section.
its answered her https://our.umbraco.org/forum/umbraco-7/developing-umbraco-7-packages/49909-Custom-Section-Custom-dynamic-Treenodes-Custom-Node-Content
By Thomas Beckert
{
}
is working on a reply...