Copied to clipboard

Flag this post as spam?

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


  • pnr 131 posts 226 karma points
    Nov 02, 2009 @ 08:14
    pnr
    0

    How to reorder nodes, under a node with a special doc type in Content tree

    I am making a calendar in the Umbraco content tree. I have made a node in the content tree with a doc type "Calendar", all nodes created under that node shall be orderet by a generic property "start date". I have been adviced too use an event for reordering the nodes in the content tree, but i havent been working with event's before, so here is my problem:

    I have made the event "beforeNodeRender" and it is executed perfect, now the problem is to reorder the nodes under my doctype "Calendar". Can someone show me a little example of how to do that?

    public void BaseTree_BeforeNodeRender(ref XmlTree sender, ref XmlTreeNode node, EventArgs e)
    {
                Log.Add(LogTypes.Custom, 1, "test From my event" );          
    }

    Thanks in advance!

    //Peter

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Nov 02, 2009 @ 09:22
    Thomas Höhler
    2

    Take a look into the packages with autofolders: Alphabetfolder, Autofolders, Datefolder)

    If you are doing this by yourself: you can set the sortorder property in the after create event

    hth, Thomas

  • pnr 131 posts 226 karma points
    Nov 02, 2009 @ 15:00
    pnr
    0

    Thanks for you reply!

    Could you provide med with a little example?

    // Peter

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Nov 02, 2009 @ 15:34
    Dirk De Grave
    0

    Peter,

    There's some examples and how-to on the wiki pages/subpages here.

     

    Hope this helps.

    Regards,

    /Dirk

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies