In the previous recipe, you learned how to list items and sort them using ListControl and SearchDataSource SPEAK components. We are going to extend the previous recipe to apply searching and filtering to them.
We will first implement search on the ProductListing
page:
From Sitecore Rocks in the
core
database, select the ProductListing application item that we created under/sitecore/client/Your Apps/Cookbook
.Open Layout Designer for the item. Add a
SearchPanel
component to theApplicationContent.Main
placeholder.Add a TextBox component to the
SearchPanel.Searches
placeholder, set its ID toTextBoxProduct
, and give any watermark text.We have already used the SearchDataSource component to retrieve product details named ProductDataSource. In its Text property, locate
{Binding TextProduct.Text}
.Preview the application. In the textbox, enter a product name and press Enter. It will retrieve and display the searched product details only,...