If you require more extensive search functionality in your website solution, you can integrate third-party search engines with Optimizely Content Management System (CMS).
SearchDataSource web control is a flexible web control that supports property searches, and you can apply different criteria to the search functionality.
Searching for pages often occurs through a Property-based search, which provides an efficient and powerful tool to retrieve pages based on any property values, typically of types other than string. From markup (or the visual design mode in Visual Studio), the CMS
SearchDataSource web control supports this type of search.
From code-behind files, you also can call the
FindPagesWithCriteria() method of the
EPiServer.DataFactory class to perform property-based searches. The
FindPagesWithCriteria method is used by the
SearchDataSource control when you perform a property-based search.
From markup or visual design mode, add
PropertyCriteria controls to the
SearchDataSource tag. From code-behind files, create
EPiServer.PropertyCriteria instances and insert them into a
PropertyCriteriaCollection that is passed to
FindPagesWithCriteria. You must add the
DataSourceID attribute to the control that renders the data.
A filter is a general mechanism in Optimizely that is used to manage and manipulate information in listings and collections of content (
IContent). As a developer, you can construct your filters to use with listings to display content. A filter is used for adding, removing, and sorting.
The following most common built-in filter options are as follows:
SortDirectionused to specify a custom property to sort on.
SortOrderuses a predefined sorting from
SkipCountto limit the number of items.
PageTypeID, and so on.
LanguageBranchescollection to limit the search.
- Criteria collection constrains the search result (used for property search or as filters).
SelectParameterscollection to set attribute values from other sources (
The Optimizely filter classes and enumerations are documented in the
EPiServer.Filters namespace. You can create your filters by extending the
Updated 3 months ago