SharePoint: UI for ordering list items

SharePoint list items have in the the base Item template a field named Order. This field is not shown by default.

SharePoint 2007, 2010 and 2013 have a possibility to specify the order in a UI, using the _layouts page:

{SiteUrl}/_layouts/Reorder.aspx?List={ListId}

In SharePoint 2010 and 2013 it is possible to add a custom action to a list. It is possible to add a custom action to order list items as follows (SharePoint 2010 description):

  1. Open SharePoint Designer 2010
  2. Navigate to a list
  3. Select Custom Actions > List Item Menu
    image
  4. Fill in the dialog box:
    SNAGHTML100ead33
    SNAGHTML100f1567
  5. Open List Settings > Advanced Settings > Content Types, and set Allow management of content types to No 
  6. On List Settings select Column Orderingimage

This results in the following UI in the browser:

image

Selecting the custom Order Items action (under List Tools > Items) results in:

image

You can change your custom action in SharePoint designer. On the list screen in the bottom right corner you can find the custom action:

image

We now need to modify the view to include the order by adding the Order field to the view, and sorting on the Order field. Problem is that the Order field is hidden. It is possible to modify the schema of the Order field to set the Hidden attribute to FALSE. If we don’t want to write code to do it and still get the required result it is also possible to modify the view through SharePoint Designer:

image

Modify the code of the view:

image

This results in:

image

Note that if you change the view through the web UI these changes are partly lost. If this is a problem modify the Order field schema for the list.

Published Wednesday, December 12, 2012 2:38 AM by svdoever
Filed under:

Comments

No Comments