Try our conversational search powered by Generative AI!

Search in EPiServer

Hi. Is there any "easy" way to sort a search result based on the page type of the pages? We would like to place results from pages with page type "Article" before pages with page type "Ordinary Web Page". Frank :)
Feb 07, 2005 23:28
One way I sort pages is by putting the PageDataCollection into a DataTable and then myDataView.Sort = sortByValue; giving the column you want to sort by.
Feb 08, 2005 10:27
Man kan lägga på ett sorteringsfilter på PageSearch objektet's filter event. Eller varför inte bara ange SortBy på PageSearch objektet. SearchPages.SortBy = "PageTypeName"; SearchPages.SortDirection = EPiServer.Filters.FilterSortDirection.Ascending; Borde funka enligt SDK'n /Håkan
Feb 09, 2005 13:05
> > SearchPages.SortBy = "PageTypeName"; > This is a correct and easy way of doing it. And if you want to append your own sort filters, there is a sample at the bottom of this FAQ article:
Feb 09, 2005 15:56
Hi! I have a PageSearch in the ascx-file Now i want to add a search from an other part of the page tree to the result of this one. I've set a new Property to find the startpage for the search, lets call it "ExtraMainContianer". So how can I add this search to the same collection of pages? I've tried to make a PageSearch in the codebehind hoping to add the found pages with a filter but it doesn't return anything. What have I forgotten. PageSearch Search = new PageSearch(); Search.PageLinkProperty = "ExtraMainContainer"; Search.SearchFiles = false; Search.OnlyWholeWords = false; Search.MainScope = "MainScope"; Search.MainCatalog = "MainCatalog"; Search.SearchQuery = SearchQuery.Text; How does it all go together?? Anyone??
Feb 06, 2008 11:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.