I'm creating a plugin package that needs to list out items in the tree view in the backend. The items it needs to display are not Umbraco content nodes, but are loaded directly from the database.
I've got it working adding items at the top level of the tree view under a root item, but I want to be able to add multi-level "folders" that can contain other "folders" or items.
Does anyone now a good way to set up a TreeController to allow nesting of items?
Multi-level tree controllers
Hi,
I'm creating a plugin package that needs to list out items in the tree view in the backend. The items it needs to display are not Umbraco content nodes, but are loaded directly from the database.
I've got it working adding items at the top level of the tree view under a root item, but I want to be able to add multi-level "folders" that can contain other "folders" or items.
Does anyone now a good way to set up a TreeController to allow nesting of items?
Thanks
Steve
Hi Steve,
the common way is to check the id of the node which is opened and regarding to that id return the child nodes.
That is looking something like that:
Thas just copy paste from a package I develop but I hope it gets you the idea. The calendar are loaded from a service directly from the database.
Regards David
is working on a reply...