Subin Vs
Subin Vs

Reputation: 121

Episerver folder order sorting structure is reflecting on website

When setting sorting for a container containing created pages. It is reflecting the structure of the website.

How to override this and set manual sorting for website?

Upvotes: 1

Views: 412

Answers (2)

WellyBilly
WellyBilly

Reputation: 26

" It is possible to select the sort order for underlying pages in the structure. By selecting sort order, you can control the order for all pages underlying the page which you are currently editing. The setting of the sort order can be alphabetical, by creation or change date, or by sort index.

To create a logical sort order of your own choice, you need to edit the parent page. Go to the tab "Advanced Information" and select "According to sort index" for "Sort order".

After this, you need to assign a number (index) to all underlying pages, in order for the system to understand in which order to arrange the pages. The page with the lowest index will be placed at the top of the menu. The standard index for pages is normally set to 100 upon creation. If you create a page which you want to be placed first in the menu, you assign the page a number smaller than 100, for example 90. If you want the page to be placed after another, you select a number larger than 100, for example 110.

It is always wise to work with at least 10-digit intervals, in case you want to add pages in between others. This can then easily be done without having to change the sort index of all other pages. Remember that sort index will only apply if you have selected "According to sort index" as sort order for the parent page. Don't forget to save and publish all pages where you have changed the sort information, for the sort order to be updated! "

Upvotes: 1

andreasnico
andreasnico

Reputation: 1488

When you fetch content from Episerver it will use the sorting you have in the pagetree (as you have experienced). This can be practial for editors wishing to have control over the sorting. If you want to change this, you have to manually (in code) sort the result after you have fetched it from the database. Ie GetChildren(..).OrderBy(x => x.Name) or whatever you wish

Upvotes: 1

Related Questions