public ActionResult PageIndex(PageIndexModel model) {
			PagedData<ContentPage> pagedData = model.Page;

			pagedData.ToggleSort();
			var srt = pagedData.ParseSort();

			if (model.SelectedSearch == PageIndexModel.SearchBy.AllPages) {
				pagedData.TotalRecords = pageHelper.GetSitePageCount(this.SiteID, ContentPageType.PageType.ContentEntry, false);
				pagedData.DataSource = pageHelper.GetPagedSortedContent(this.SiteID, ContentPageType.PageType.ContentEntry, false, pagedData.PageSize, pagedData.PageNumberZeroIndex, pagedData.OrderBy);
			} else {
				IQueryable<ContentPage> query = null;
				if (!model.ParentPageID.HasValue) {
					query = pageHelper.GetTopNavigation(this.SiteID, false).AsQueryable();
				} else {
					query = pageHelper.GetParentWithChildNavigation(this.SiteID, model.ParentPageID.Value, false).AsQueryable();
				}

				query = query.SortByParm<ContentPage>(srt.SortField, srt.SortDirection);
				pagedData.DataSource = query.ToList();

				pagedData.TotalRecords = pagedData.DataSource.Count();
				pagedData.PageSize = 1 + (pagedData.TotalRecords * 2);
			}

			ModelState.Clear();

			return View(model);
		}
		public ActionResult PageIndex() {
			CMSConfigHelper.CleanUpSerialData();
			PageIndexModel model = new PageIndexModel();
			model.SelectedSearch = PageIndexModel.SearchBy.Filtered;

			PagedData<ContentPage> pagedData = new PagedData<ContentPage>();
			pagedData.PageSize = 10;
			pagedData.InitOrderBy(x => x.NavMenuText);
			model.Page = pagedData;

			return PageIndex(model);
		}