I have a EPiServer:PageList control where I try to set the sortorder, from an inparameter.
protected override void OnLoad(System.EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
epiPageList.PageLinkProperty = PageLinkProperty;
epiPageList.PageLink = PageLink;
if (MaxCountProperty != null && CurrentPage[MaxCountProperty] != null)
{
epiPageList.MaxCount = (int) CurrentPage[MaxCountProperty];
}
if (PageLink != null)
{
epiPageList.SortOrder = (EPiServer.Filters.FilterSortOrder)GetPage(PageLink).Property["SortOrder"].Value;
}
if (PageLinkProperty != null)
{
if (CurrentPage[PageLinkProperty] != null)
{
PageData page = GetPage(CurrentPage[PageLinkProperty] as PageReference);
epiPageList.SortOrder = (EPiServer.Filters.FilterSortOrder)page.Property["SortOrder"].Value;
}
}
epiPageList.DataBind();
}
}
the parameter is set correctly, but the list still does not sort correctly. I have set the sort order to "Alphabetical", but it still sorts on creation date.
Should this sort on the page name or the titel?
protected override void OnLoad(System.EventArgs e) { base.OnLoad(e); if (!IsPostBack) { epiPageList.PageLinkProperty = PageLinkProperty; epiPageList.PageLink = PageLink; if (MaxCountProperty != null && CurrentPage[MaxCountProperty] != null) { epiPageList.MaxCount = (int) CurrentPage[MaxCountProperty]; } if (PageLink != null) { epiPageList.SortOrder = (EPiServer.Filters.FilterSortOrder)GetPage(PageLink).Property["SortOrder"].Value; } if (PageLinkProperty != null) { if (CurrentPage[PageLinkProperty] != null) { PageData page = GetPage(CurrentPage[PageLinkProperty] as PageReference); epiPageList.SortOrder = (EPiServer.Filters.FilterSortOrder)page.Property["SortOrder"].Value; } } epiPageList.DataBind(); } }
the parameter is set correctly, but the list still does not sort correctly. I have set the sort order to "Alphabetical", but it still sorts on creation date. Should this sort on the page name or the titel?