November Happy Hour will be moved to Thursday December 5th.

Standard Search issues

Vote:
 

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.

#82085
Mar 05, 2014 12:15
Vote:
 

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" >
<Criteria>
<EPiServer:PropertyCriteriaControl runat="server" Condition="NotEqual" Type="Boolean" Name="HideFromSearch" Value="true" />
</Criteria>
</EPiServer:SearchDataSource>

    

#82092
Edited, Mar 05, 2014 12:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.