Layout assignments for search terms
You might want to customize the layout of the search results page for a specific search term. If so, you can create a layout and assign it directly to the search term. When a customer uses the search term to search your site, the search results page is rendered with your assigned layout instead of the default layout for the search results page.
laptop:
Commerce Composer widgets for search results pages
The widget library that is included with the Commerce Composer tool provides various widgets that you can use in a layout that is assigned to a search term. The following widgets provide the features of a typical search results page:- Search Summary widget
- Catalog Entry List widget
- Site Content List widget
- Category Navigation widget
- Facet Navigation widget
You 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. You can add new synonyms in the Catalogs tool whenever they are required. For more information, see Creating search term associations using synonyms and replacements.- You create a layout to use as the search results page for laptop computers.
- You assign your layout to the search term
laptop
, as shown in Assigning a layout to a search term. - In the Catalogs tool, you set up the following synonyms for the
search term
laptop
: laptops, notebook, notebooks
- laptop
- laptops
- notebook
- notebooks
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 you can disable the function if required. The Use synonyms check box is on the Configurations tab in the Store Management tool. For more information, see Selecting store functions.
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 your store. For this alternative method, you must complete these steps:- In the Commerce Composer tool:
- Create a content page (a page URL) to use as a search landing page.
- Create a layout for the landing page and assign it to the content page.
- In the Catalogs tool, link the URL for the content page to the search terms. For more information, see Linking and unlinking search terms with landing pages.
If you use this method:
- Widgets that depend on the search term to display data will not work correctly. For content pages, the search term is not passed into the widget, so the widget cannot display the search-related data. All of the widgets that are listed earlier in this topic depend on the search term.
- You cannot run web activities in the widgets that depend on a search term. An example is a web activity that uses the Search Criteria and Results target.