Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am building a custom section.
I am having trouble with the BaseTree and would rather be using the TreeController, because it's just easier to use. Is there a way to be able to still use MVC instead of Angular and use TreeController? Thanks for any help.
Edit: Sorry, bit vague on the actual answer to your question - in short, you can't use MVC with the TreeController.
I would recommend checking out the AngularJs Workbook found here:
In relation to trees and editing nodes, there is a convention around where the angular views are located for editing but I'm having a little trouble finding the documentation on it right now. Best thing to do maybe is to read the Umbraco source code for some of the trees.
Documentation for the TreeController is here:
It's currently lacking in the Tree Creation area, but contains a lot of useful information anyway.
To create your own tree, you can either inherit directly from TreeControllerBase or TreeController - the latter encapsulates a few things based on the TreeAttribute so you don't have to define everything - e.g. (a skeleton class for you):
[Tree("myApp", "myTree", "My Tree")]
public class MyTreeController : TreeController
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
I did find I could edit the route using
node.RoutePath = "/myroute/"
but I'm having the same issues as this ticket
I did a session on creating custom sections using Angular at last years Umbraco UK Festival.
The source code of that talk can be found here :
The video of the talk is also up on youtube :
I explain how to set up the tree controller and how the routing works.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted