Skip to main content

Outline

In this module, you will learn how to manage and customize the order in which pages are displayed within the page tree structure in Optimizely CMS. Understanding page listing order is essential for maintaining a logical and user-friendly site structure. You’ll explore how the system’s default sorting works, how to manually adjust the order using sort indexes, and how to reorder pages through drag-and-drop. By mastering these options, you’ll be able to control how content is displayed in navigation menus and listings across your website.​

​By the end of this module, you will be able to:​

  • Understand how page listing order works within the page tree structure​

  • Identify different sorting methods, including default, alphabetical, and sort index​

  • Adjust page order using sort index values for precise control​

  • Reorder pages through drag-and-drop and understand when this applies​

Page listing order​

The pages in the tree structure are sorted according to a predefined sort order. By default, the page created most recently is placed at the top of the tree structure, for example, in news listings. There are also other options for sorting, such as alphabetically or by sort index. The sort order is set on the parent page of a branch and will be inherited by the subpages.

Page listing order

Changing page listing order ​

Try the Navattic demo walkthrough to learn how to change page listing order: https://optimizely.navattic.com/uls0mjj

Sorting according to sort index:​

If you want to control exactly how the pages in the structure are sorted, select the According to sort index option for theparent page.

Page sorting according to sort index

Then give each subpage a unique sort index number. They will be sorted in ascending order according to their number, with the lowest number on top. Note that you can also add minus numbers to insert a page over a page with the sorting number of zero. For example “-100”.

Note: It is a best practice to choose even hundreds when you number the pages. This allows you to easily insert extra pages after the initial numbering has been done. You can then give a new page a sorting number 150, for example, that would sort between 100 and 200. If you number the pages 1, 2, 3, 4, etc., you cannot add a page in between 1 and 2.​

​Changing sort order with drag-and-drop ​

You also can change the sort order of pages by dragging the page and dropping it where you want it in the tree structure. Sorting pages with drag-and-drop is only of interest for branches that are sorted with sort index. ​

​Moving into a branch that is NOT sorted by sort index ​

If you move a page into a branch that is not sorted according to sort index, you get prompted to move the page, and at the same time apply sort index as sort order for that branch.​

​Moving into new position in the same page tree branch ​

When you drag a page into a new position in a page tree branch, the sort index is automatically recalculated to fit the sort order of that branch. ​

​Moving into new parent page with sort index set as sort order ​

When you drop a page under a different parent page [with sort index set as sort order] the page will automatically be assigned the sorting order according to where you dropped it in the tree structure. ​

Note: The pages that you move are saved again, meaning that you must have publishing rights to use drag-and-drop for sorting. You also must have publishing rights for the page branch with sort index to which you move a page.​

​To learn more about to how sort page order visit Sort page order in menus.