Page sorting

Jul 25, 2008 at 2:05 AM
I found a couple old posts regarding the ability to sort the pages list.  The current PageList control's solution is to sort them alphabetically regardless of hierarchy.

Has anybody created a solution for custom ordering of Pages yet?  I expected to see a SortID property on the page object and an admin UI to update the order.  If not, I'll hack something in there and follow-up.
Aug 1, 2008 at 11:16 AM
Have you found a solution for this?
I think this is the only missing function for to be a useful CMS also.

I am a newbie in, and was looking on the old suggestion for BE1.3 - I was trying to apply this to BE1.4. And maybe something like:

In the BindPages() in app_code/controls/Pagelist.cs: BlogEngine.Core.Page.Pages.Sort("DisplayOrder")
In Pages/Pages.aspx add a textbox for DisplayOrder
Add label for DisplayOrder textbos into App_GlobalResources
In admin/Pages/Pages.aspx.cs update



private void BindPage(Guid pageId)
Page page = BlogEngine.Core.Page.GetPage(pageId);
txtTitle.Text = page.Title;
txtContent.Text = page.Content;
txtDescription.Text = page.Description;
txtKeyword.Text = page.Keywords;
txtSlug.Text = page.Slug;
cbIsFrontPage.Checked = page.IsFrontPage;
cbShowInList.Checked = page.ShowInList;
cbIsPublished.Checked = page.IsPublished;
txtDisplayOrder.Text = page.DisplayOrder.ToString();


The current post on this suggests to add
    private int _DisplayOrder;
    /// <summary>
    /// Gets or sets the display order of the pages.
    /// </summary>
      public int DisplayOrder
        get { return _DisplayOrder; }
            if (_DisplayOrder != value) MarkDirty("DisplayOrder");
            _DisplayOrder = value;

To Page.cs, but I cannot find where to add it... It also has an addition to xmlBlogProvider.cs

Or maybe you could use metatags (private void AddMetaTags()) in Page.aspx.cs ? But i dont know if you could sort on it?



Feb 22, 2009 at 9:08 PM
View this thread for info about a patch