Wednesday 20 June 2012

Sort Folders (Custom Order) in SharePoint Document Library

One of my friend recently asked me this question about sorting the folders (not in alphabetical order) in a document library. The sort order has to be custom and user should be able to specify the order in which folders should appear. Example sort order

Top
Middle
Bottom


In order to implement this you can create a new folder content type and add an order column to this content type. You do need to have the appropriate rights to do so.

The steps would be as follows.


  • Go to Site Actions
  • Go to Site Settings
  • Go to Site Content Types
  • Click Create New
  • Give it a name such as Folder Order
  • Select Parent Content Type from as of Folder Content Types
  • Select Folder as the Parent Content Type
  • You can create a new group or leave it in custom content types
  • Click OK
  • At the content type settings click Add from new site column
  • Create a site column called Item Order or something similar, select the type as Number
  • Click OK
  • Go to the list where you want the folders to be ordered
  • Go to the list settings
  • Go to Advanced Settings
  • Select allow management of content types
  • Select No for display new folder command on the new menu
  • Click OK
  • You should now see an area called content types, leave the document as is
  • Click Add from existing site content types
  • Select the Folder Order (or whatever you named it)
  • Click OK


That's it you can now create a folder structure with the order column and order your items as you need. 

7 comments:

  1. Great article, this was very helpful.

    ReplyDelete
  2. From the "list where you want the folders to be ordered" - where can I find the list settings?

    Thank you!

    ReplyDelete
  3. this was so helpful, thanks a lot :)

    ReplyDelete
  4. Hi all, I just want to find out if I can apply the steps above to existing folders (if so how) or do I have to follow the steps first then create folders?

    ReplyDelete
  5. Thanks for sharing this. I can now change the existing folders content type and change the order

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. I'm in the folder where I'd like to set the order and I don't see Site Actions anywhere. Maybe in your instructions it would be good to include where you find that.

    ReplyDelete