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?
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.
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.
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'
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?
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
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.
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
is working on a reply...
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.