Search list

A search list allows you to show a list of how many results would be returned for a term entered into a field on a search page. For example, if you search for the word squiz, you would receive thirty results, so the search list will show squiz (30). An example search list is shown in the figure:

A search list

When the user clicks on a term in the list, it shows the term’s search results.

Once you have created a search list, you can configure its settings on its associated asset screens. The majority of these screens are the same as a Standard page or an Asset listing. This chapter will describe the Details screen, which is different for a search list.

Additional dependant assets

When you create a search list, two assets are automatically created beneath it.

The dependant assets

You can use these assets to define the layout of the search list.

Page contents

This bodycopy is used to define the overall layout of the list, including where to put the list of terms, a heading for the page, and information about the list.

Page contents (no results)

This bodycopy is used to define the list’s overall layout when there are no terms in the list. This layout can include a heading for the page and a message informing the user there are no terms. These dependant assets are similar to those that are created under the asset listing page. Read the Asset listing documentation for more information on this asset.

Details screen

The Details screen allows you to configure the search list settings and the order of listed results. Read the Asset details screen documentation for more information about the status, future status, thumbnail, and details sections.

Search term format

This section allows you to specify the layout of each of the search terms in the list. By default, the information that is shown in the figure will appear.

The search term format section of the details screen

Click on the edit icon to format the layout – a WYSIWYG editor will appear.

Within the layout, you can use the following keyword replacements:

%search_term%

This will show the term that is hyperlinked to the search page. When the user clicks on the hyperlink, the search page will show the results for that term.

%number_of_occurrences%

This controls the number of results that will be shown for the term.

Search page setup

This section allows you to select which search field to use for the search list. The search page setup section of the details is shown in the figure:

The search page setup section of the details screen

The fields available are as follows:

Select search page

Select which search page to use for the search list. This search page will perform the search for terms and show the results when the user clicks on a term in the list.

Select search field

By default, no information will appear in this field, as shown in the previous figure. Once you have selected a search page in the select search page field, a list of fields that have been defined on the search page will appear. Select the field that you want to use for the search list from the list. The list of possible terms and results will be based on this field. For example, say you have created a Name field on the search page that searches the assets' Page name field. If you select Name on a search list, it will show all possible terms that can be entered into the Name field to show at least one asset in the search results.

Sorting

The sorting section of the Details screen is shown in the figure:

The sorting section of the details screen

This section allows you to define how many terms to show in the list. By default, this is set to 0, meaning that all possible terms are shown. Enter the number of terms to show on the page in the words per page field. You can use this field to restrict the number of terms seen on the page or break the list into several pages. To do this, add the keyword replacements %previous_result_page_link% and %next_result_page_link% to the page contents bodycopy so that the user can navigate to the next page of terms.

© 2015- Squiz Pty Ltd