The best way to install Sift is to use the NuGet package manager in Visual Studio, search for "StuartMullinger.Sift8". For those who prefer the command line:
PM> Install-Package StuartMullinger.Sift8
If content already exists then you may need to rebuild the Examine index in the Umbraco back office before all of the features of Sift can be used.
Using Sift it is possible to create a filter on your Umbraco website by adding some HTML to your view. The HTML will need to include these elements.
In the above example, the filter will search for content with a document type of cinemaCento.
Within the outer <div> a form can be defined in which the criteria fields for the filter will be specified. The form must have a class of sift-criteria. The form must include an anti-forgery token, using Html.AntiForgeryToken().
The form can include any number of criteria, which can be text fields, select list dropdowns, checkbox lists or radio button lists. Further details of how to set each of these up can be found in this user guide. The above example defines a single text field.
Each criterion within the form must contain the class sift-criterion. It must also specify the document type property alias that the field will be matched too, using the data-sift-match-property attribute. In the above example the text field matches to the nodeName property, a special case which will match to the name of the content. Any other property alias could be used, as defined in the document type.
Any submit of a sift-criteria form will cause a search to be performed.
A Sift search will populate the results <div>. This should be an empty <div> element, within the outer <div> and it should have a sift-result class. This element will be cleared and re-populated after each search.
Sift includes a default partial view that is used to render the results. This can be overridden to provide whatever information is required.
The above example will render as follows. The front-end developer is free to add styling to render the page as desired.