The whole tree thing in pre 4.1 is quite annoying and doesn't make a whole heck of alot of sense :) But, you're sort of on the right track. TreeInit.aspx is the page to use as the address in an iframe to render the tree which will then make async calls to Tree.aspx.
You'll notice there's another method for your 'service' object like Get...Url ( I can't remember of the top of my head) which should return you the tree.aspx address (instead of the treeinit.aspx address). The tree.aspx page is actually an xml service and will return the xml structure to populate the tree nodes from the current node specified by query strings.
I'm not sure what you are trying to acheive but am assuming that you might not want just the xml structure of nodes? as this is all you'll get with Tree.aspx. If you want to actually change the content tree (have full control over what is rendered), you'll need to override a class called loadContent and override the render method (amongst other things). Then you'll need to replace the loadContent tree in the AppTree database table with your own tree type.
I'm not sure if any of this helps as I don't know what you are trying to acheive, but hopefully it does!
How to set startnode on TreeInit.aspx (TreeService)
Hi
Umbraco v 4.0.4.2
I can not get the startnode to work when trying to use the TreeService :-( I always get the root.
And when I try debug by accessing the url directly I get something like this
/umbraco/TreeInit.aspx?app=content&id=1024
Should't the tree start at Document id 1024?
So basicly my quistion is: Is it possible to set the startnode?
The whole tree thing in pre 4.1 is quite annoying and doesn't make a whole heck of alot of sense :) But, you're sort of on the right track. TreeInit.aspx is the page to use as the address in an iframe to render the tree which will then make async calls to Tree.aspx.
You'll notice there's another method for your 'service' object like Get...Url ( I can't remember of the top of my head) which should return you the tree.aspx address (instead of the treeinit.aspx address). The tree.aspx page is actually an xml service and will return the xml structure to populate the tree nodes from the current node specified by query strings.
I'm not sure what you are trying to acheive but am assuming that you might not want just the xml structure of nodes? as this is all you'll get with Tree.aspx. If you want to actually change the content tree (have full control over what is rendered), you'll need to override a class called loadContent and override the render method (amongst other things). Then you'll need to replace the loadContent tree in the AppTree database table with your own tree type.
I'm not sure if any of this helps as I don't know what you are trying to acheive, but hopefully it does!
Shannon
is working on a reply...