Fuji is referring to the actual rendering of content and not the back office. Sorting automatically in the back office is a harder than sorting during the render. Or if you are just looking for a UI solution look at sort option on the folder itself. There were some packages available for auto sorting for v4 but not sure they were updated. You can sort it based on the column headings but if thats not enough you would need to write content event to sort the back office documents. If you need a custom solution look into the info on writing content events found here http://our.umbraco.org/documentation/Reference/Events-v6/
In the event you would need to look up the parent node and get sort order of each of its children and update the order accordingly based on where the new item is required to sit in the order, and republish them accordingly.
Hopefully this gives you a starting point. Be aware that writing events is slightly different depending on version of Umbraco.
Sorting
how to automatically sort a folder when a child is created under that folder
Hi,
In umbraco when a new node or media is created it is sorted in such a way that the last created content is at the bottom of the folder.
If you want to order them then you need to make use OrderBy("createDate desc") in razor .
can u give me a exapmle
Hey There.
Fuji is referring to the actual rendering of content and not the back office. Sorting automatically in the back office is a harder than sorting during the render. Or if you are just looking for a UI solution look at sort option on the folder itself. There were some packages available for auto sorting for v4 but not sure they were updated. You can sort it based on the column headings but if thats not enough you would need to write content event to sort the back office documents. If you need a custom solution look into the info on writing content events found here http://our.umbraco.org/documentation/Reference/Events-v6/
In the event you would need to look up the parent node and get sort order of each of its children and update the order accordingly based on where the new item is required to sit in the order, and republish them accordingly.
Hopefully this gives you a starting point. Be aware that writing events is slightly different depending on version of Umbraco.
these events are for umbraco functions right.. i want to sort a a folder which i have created
is working on a reply...