How to Manually Sort Items in Sitecore CMS

May 20, 2015

Blog | Development | How to Manually Sort Items in Sitecore CMS
How to Manually Sort Items in Sitecore CMS

Welcome back to our ongoing series about learning how to use and develop for Sitecore CMS. This post is the follow-up to “How to Copy Items in Sitecore CMS”.

Today, we’ll look at how to manually sort items. Sorting items can help to keep the content tree organized. And, when accessed via code, items may be returned in the order that they occur within the content tree. This allows developers to set up menus and content listings that are easily managed by content editors.

From the Ribbon

Select the item you’d like to sort in the content editor.

Use any of the four sorting buttons in the “Sorting” section of the “Home” tab in the ribbon.

The “Up” and “Down” buttons will move an item once in the respective direction. The “First” and “Last” buttons will move an item to the top or bottom of the list of siblings respectively.

From the Context Menu

Right-click the item you’d like to sort in the content tree.

Click any of the four sorting buttons in the “Sorting” submenu of the context menu that appears.

Drag & Drop

Click and drag the item in the Content Editor.

Hovering between items in the content tree will show a bar between the items.

Dropping the item will open a confirmation dialog to sort the item.

Clicking OK will move the item to the selected location.

From the Sortorder Field

Select the item you’d like to sort in the content editor.

Change the value in the “Sortorder” field in the “Appearance” template section to a different integer value.

A few notes on Sortorder values:

  • Larger values will appear lower in the list.

  • Items with a blank or invalid sortorder value will use the default value which is specified in the web.config and has a default value of 100.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <sitecore>
        <settings>
          <setting name="DefaultSortOrderValue" value="100"/>
        </settings>
      </sitecore>
    </configuration>
    
  • Items with the same sortorder value will be sorted based on the “Subitems Sorting” of the parent item. More on “Subitems Sorting” will be covered in a future post.


Check back next week for the latest tutorial. And, as always, if you have any questions or if there’s something you’d like to see covered, Tweet to us @GeekHive! You can also reach me @zzzzBov.

Tim Leverett

Senior Developer
Tags
  • Sitecore

Recent Work

Check out what else we've been working on