I am creating Building Blocks tree structure through Core Service, CMS automatically sort them alphabetically but i want to sort them according to the order i create them. Is there any way to sort them?


Tridion will always sort alphabetically in the CME. If you really need another order, you can either prefix your titles (e.g. 010_ItemName) or you will need to write a GUI extension to order them differently.

  • Yes i will use prefix approach, I am also trying to associate a metadata to my folder, I have created a test folder and associated the metadata and i got following XML [<Metadata> <folder-typexlink:href="tcm:4-143-1024"xlink:title="Folder">Folder</folder-type> </Metadata>] when i assign the same xml to my actual folder's metadata string property it gives error [Root element must be in namespace:] Is there any other way to associate a metadata schema to a folder? – Ali Sep 2 '13 at 7:10
  • uuid in your metadata schema must match, while assigning metadata xmlelement. This is the reason you are getting the error. – AlokBhatt Sep 2 '13 at 10:51
  • Consider creating a new question for these comments--they'd be useful as a separate Q&A. :-) Also, please accept this answer if it answered your question. – Alvin Reyes Sep 2 '13 at 17:26

You can use Linq to sort items based on Creation Date.

OrganizationalItemItemsFilterData itemsFilter = new OrganizationalItemItemsFilterData();
IEnumerable<IdentifiableObjectData> items = channel.GetList(buildingBlocksId, itemsFilter).OrderByDescending(o => o.VersionInfo.CreationDate);

Out of the box, you can sort folders using the Modified column in the Content Manager. This would match your creation date before any changes.

Otherwise consider adding a column for Creation date if this is a frequent use case.

Tip: the business should have input into the directory structure as well as any changes to default ordering, especially for non-system folders. Sorting by name is a very common authoring convention. :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.