Layout assignments for search terms

You might want to customize the layout of the search results page for a specific search term. If so, we can create a layout and assign it directly to the search term. When a customer uses the search term to search the site, the search results page is rendered with your assigned layout instead of the default layout for the search results page. The following example shows the Search terms table in the Commerce Composer tool, where a layout is assigned to the search term laptop:Figure 1. Assigning a layout to a search term

Tip: This scenario is different from typical layout assignments because we are assigning the layout directly to the search term, not to a page, even though the search results page is affected.


Commerce Composer widgets for search results pages

The widget library included with the Commerce Composer tool provides various widgets that we can use in a layout assigned to a search term. The following widgets provide the features of a typical search results page:

We can also use widgets that are marked with an X in the Widgets for any page column in Commerce Composer widget library.


Synonyms for search terms

By default, layout assignments are extended to synonyms of the search term that you specify. The Commerce Composer tool checks for any existing synonyms that are defined in the Catalogs tool as search term associations. We can add new synonyms in the Catalogs tool whenever they are required. See Creating search term associations using synonyms and replacements.Here is an example of how a layout assignment is extended to the synonyms of a search term:

As a result, the layout is used on the storefront when a customer searches using any of the following search terms:

In the Store Management tool, a Use synonyms check box controls whether the layout assignment is extended to synonyms of the search term as described here. This store function is enabled by default, but we can disable the function if required. The Use synonyms check box is on the Configurations tab in the Store Management tool. See Selecting store functions.

Important: When you specify search terms and synonyms, include all variations of the term that you expect customers to use. For the layout to be assigned, the customer's search term must be an exact match to the search term or synonym.


Comparison: using the Catalogs tool to link a search term to a content page

Management Center offers another method for displaying a layout when a customer uses a specific search term to search the store. For this alternative method, complete these steps:

  1. In the Commerce Composer tool:

    1. Create a content page (a page URL) to use as a search landing page.

    2. Create a layout for the landing page and assign it to the content page.

  2. In the Catalogs tool, link the URL for the content page to the search terms. See Linking and unlinking search terms with landing pages.

If you use this method:


Related concepts
Layouts, layout templates, and default layouts
Layout assignments for category pages
Layout assignments for catalog entry pages


Related tasks
Creating a layout for a page
Creating a layout for a search term
Populating tabbed slots in layout templates
Viewing the list of layouts assigned to a page
Copying a layout
Viewing information about widgets in store preview
Viewing information about pages and layouts in store preview
Linking and unlinking search terms with landing pages