Changing order of node creation for a specific document type
Hi Forum! This is my first post here, I've got this question I can't seem to find an answer to... one of those cases where I don't know *how* to search for it, so I thought I'd ask. We've got this custom News section on a site, where the user can create custom NewsItem nodes below it. But because of Umbraco's default behaviour of showing a new node below all others, new News items end up on the bottom. Our user would like to see these items come up on top. Is there a way to reverse the order of creation in the child list of new nodes (preferably for a certain node type)? This is on Umbraco 4.0.1 (still have to upgrade to 4.0.3...)
You would have to tie into the Umbraco events to do that. I'd go with the Document.AfterSave event. There you'll have to programmatically change the sort order yourself.
Thanks guys for your quick replies. I'll have a look at both solutions mentioned; the "large number of news items" issue is definitely one to watch out for.
Changing order of node creation for a specific document type
Hi Forum! This is my first post here, I've got this question I can't seem to find an answer to... one of those cases where I don't know *how* to search for it, so I thought I'd ask. We've got this custom News section on a site, where the user can create custom NewsItem nodes below it. But because of Umbraco's default behaviour of showing a new node below all others, new News items end up on the bottom. Our user would like to see these items come up on top. Is there a way to reverse the order of creation in the child list of new nodes (preferably for a certain node type)? This is on Umbraco 4.0.1 (still have to upgrade to 4.0.3...)
Many thanks,
Bas Horsting
You would have to tie into the Umbraco events to do that. I'd go with the Document.AfterSave event. There you'll have to programmatically change the sort order yourself.
Here's a wiki article on the events to get you started: http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples
Please note that if you have a long list of news items, it will take longer and longer to to sort, so saving the a document also takes longer.
If you do have this situation, it might be better to divide content up into date folders.
Thanks guys for your quick replies. I'll have a look at both solutions mentioned; the "large number of news items" issue is definitely one to watch out for.
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.