Copied to clipboard

Flag this post as spam?

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


  • Sjors Pals 617 posts 270 karma points
    Jun 10, 2009 @ 13:32
    Sjors Pals
    0

    Customising menu sort order

    Hi a customer of us did ask or it is possible to change the sort order of certain nodes in the CMS tree, i was wondering or the BeforeNodeRender is suitable to write a handler that overrides the default sorting, anybody does have idea's or this is a good way to handle this?

  • Richard Soeteman 4054 posts 12927 karma points MVP 3x
    Jun 10, 2009 @ 13:45
    Richard Soeteman
    100

    Hi Sjors,

    I think The beforeNodeRender Event is the best place (IF you want to do this). But I think it comes with a performance penalty because you need to sort the menu's for each node. Check out the blogpost I wrote where I search for the Publish menu and Insert a custom Unpublish menu directly after that.

    Cheers,

    Richard

  • Sjors Pals 617 posts 270 karma points
    Jun 10, 2009 @ 13:51
    Sjors Pals
    0

    Thanks for your answer, my idea was based on your blog about the new events :)
    I think i am gonna answer our client that it might me not a very good idea.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jun 10, 2009 @ 13:52
    Dirk De Grave
    0

    Hi,

    Adding another option: build your own ITree implementation, or if possible, inherit from class that builds the content tree (loadContent) and override the necessary methods to change the order in which nodes appear. Not sure if inheriting is best option, as I don't know it this is 'open for extension, closed for modification'

    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