Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yoann 8 posts 20 karma points
    Jun 25, 2009 @ 13:00
    Yoann
    0

    Custom Section Tree - Render(ref XmlTree tree) not working

    Hello,

    I am under the umbraco 4.0.2.1, asp.net 3.5

    I have create a new section and the base node without any problem. It' working.

    But my Render(ref XmlTree tree) seems to not work. I put on it juste a Response.Write() and .. nothing append.

    I don't understand my error, could you help me please ?

    Thanks in advance.

    This is my code (i don't put the 2 properties _Id and _App):

    public class Basket : BaseTree {

        }</pre>
    

    }
  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jun 25, 2009 @ 13:12
    Aaron Powell
    1

    The render method is called via AJAX so the Response.Write method will add it to the AJAX response stream. You'll need something like Firebug which can look at that but I'd strongly recommend against using Response.Write as you'll corrupt the returned data and cause the JavaScript to break when the request is finished.

    There is some good documentation on the wiki which talks about creating new applications: http://our.umbraco.org/wiki/reference/api-cheatsheet/tree-api---to-create-custom-treesapplications

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jun 29, 2009 @ 23:16
    Shannon Deminick
    0

    The render method is probably a poor choice for naming conventions here... it is not like the render method of a user control or page, it's used to 'render' the data for a tree branch. The naming is legacy from who knows what version.

    What you need to do is add XmlTreeNode's to the XmlTree passed in by ref to this method.

    The link that @slace pointed you to explains it all.

    (though i still have to fix up the styling on that wiki page ;)

Please Sign in or register to post replies

Write your reply to:

Draft