Creating a search template
Overview
A search template is created in exactly the same way as a regular template, except that the rails are populated with content returned by a search that is initiated by the end user of a client application instead of by explicitly specified content.
Setting up a search template
To set up a search template, in Rails Builder:
1. Create a new template and initial layout

On the Rails Builder page, click
in the left (Templates) pane to create a new template and layout. (See Creating, editing, and deleting templates.)
Click
and select the locale for the template.
Give the template and its initial layout names and titles. (This will create a template with one layout. You can add more layouts to the template if required.)
Note: the Template name that you define here is the one that the client application must use when Searching using search rails.Optionally:
Under Template:
Use Additional Properties to add any additional properties that are required for the template.
In Blueprint, select a blueprint to apply predefined values to the template.
Under Layout:
Under Destination Selection, leave All Devices selected.
Under Default Rail Image Orientation, select the image orientation.
Use Additional Properties to add any additional properties that are required for the layout.
Click Create Template >. The template is displayed, showing the initial layout
2. Add rails

Click the layout that you just created.
For each rail that you want to add:
Click Create Rail (or Add New Rail in the right pane).
Click
and select the locale for the rail.
Give your rail a name and a title and click Create Rail >.
3. Add content to the rail

In the newly-created rail, click Add Content.
For each rail section that you want to add (do this only once if you want the rail to consist of a single section):
At the top, hover over Personalised and then click Search.
Under Engine, select the search engine you want to use.
Optionally, in Query, add any additional search terms to be used in the search. For example, if you want the rail to only display series that match the user’s search query (and no other type of content), type
type=series
.Optionally, if you want to restrict the search to a specific provider, select the provider in Provider.
Optionally, to restrict the search to content that belongs to a particular genre, select the genre in Genre.
Optionally, to restrict the search to content that features a particular actor, type or select the actor in Actor.
In Number of items, type the number of search results to be included in the rail.
Click
at the top right of the pane to add the section to the rail.
Once you have added all the required sections to the rail, click Save Unsaved Changes.
Click Back to Rails to see your new rail.
Click Layouts to go back to the layouts view for the template.

4. Enable the layout
At the top-right of the layout tile, click and select Set as Default to enable the layout.
Note that you can mix and match different types of section in a rail. For example, you can have one section containing search results and another containing recommendations.
You can also have multiple rails in the template/layout that is used for search. Again, these do not all have to be search-based. For example, you could have two search-based rails, one promotional banner rail, and one recommendation rail.