Page sort

Topics: ASP.NET 2.0
Oct 25, 2007 at 7:39 AM
As far as I can see, there is no way to sort the pages (not talking about the blog entries)
They seem to be sorted by GUID, which have weird consequences when the order they appear is not a result of a sortorder, title or timestamp.
If a page is added and it ends up in a weird place in the menu (if a usercontrol which loops through the pages is used) the only way to fix it is to start over again.


Will there be a way to sort those pages?
The best way, I guess, would be to have sortorder and timestamp added to those pages so that those could be set within the hierarchy.
Mads? Others?

Cheers!
- jonah
Oct 28, 2007 at 6:55 AM
If alphabetic sort is ok for now, check below

Sorting the page list shown => file effected Page.cs
************************************************************

Before:
=======
public static List<Page> Pages
{
get
{
if (_Pages == null)
{
lock (_SyncRoot)
{
if (_Pages == null)
_Pages = BlogService.FillPages();
}
}

return _Pages;
}
}

After:
======
public static List<Page> Pages
{
get
{
if (_Pages == null)
{
lock (_SyncRoot)
{
if (_Pages == null) //Modifid by Sukeshak
{
_Pages = BlogService.FillPages();
_Pages.Sort(delegate(Page p1, Page p2) { return String.Compare(p1.Title, p2.Title); });
}
}
}

return _Pages;
}
}




jonahcarneskog wrote:
As far as I can see, there is no way to sort the pages (not talking about the blog entries)
They seem to be sorted by GUID, which have weird consequences when the order they appear is not a result of a sortorder, title or timestamp.
If a page is added and it ends up in a weird place in the menu (if a usercontrol which loops through the pages is used) the only way to fix it is to start over again.


Will there be a way to sort those pages?
The best way, I guess, would be to have sortorder and timestamp added to those pages so that those could be set within the hierarchy.
Mads? Others?

Cheers!
- jonah

Oct 28, 2007 at 8:13 AM
Well, it's better if all pages are supposed to be in alphabetical order, which rarely is the case.
The best thing would be to have a sort order value which could be altered in admin.

Thanks for your work though, it at least shows where the list shold be sorted before rendering. :)

Thanks!
- jonah
Jun 29, 2008 at 2:46 PM
Has there been any effort to add a Page order capability to the Admin view? I want to list my pages in priority order, not alphabetical... Thanks!
Michelle
Feb 22, 2009 at 8:07 PM
There appears to be a patch (click here for patch), but it doesn't work with v1.4.5.0.  Does anyone know of an update to it?
Jul 16, 2009 at 12:26 PM

A SortOrder value with the pages should (in my world) be on high priority.

I would very much want to see that.

Jul 20, 2009 at 11:18 AM

Sorting on creationdate page:

check thread on http://blogengine.codeplex.com/Thread/View.aspx?ThreadId=54318