I need to use the standard search feature in EPiServer 7. I can't use EPiServer Find due to the customer.
But I have some trouble making it work.
All my search logic is written in code behind in a template page. I used the SearchDataSource property to do a search, but this dosent seem to work right. I've searched and follow some tutorials on google but they seem to only work with past EPiServer versions and are using webcontrols etc..
I want to filter my search result on a property I have on all my pagetypes called "hide in search" that the editor can checkbox to hide the page from search results.
If anyone has an example on how you can make a search and get the page results I would be happy to get some help.
Have you checked the SearchPage template that comes with the EPiServer 7 Alloy demo package?
It uses a standard SearchDataSource control.
To filter for your "Hide in Search" property you could setup your SearchDataSource control like this:
<EPiServer:SearchDataSource runat="server" ID="SearchDataSource" EnableVisibleInMenu="false" >
<EPiServer:PropertyCriteriaControl runat="server" Condition="NotEqual" Type="Boolean" Name="HideFromSearch" Value="true" />