How to create a search listing page
Only site admins and admins can create a search listing page. If you’re not a site admin and want a search listing page, contact your department’s central digital team.
First read about SDP search listing page options.
The search listing content type can be configured to display a searchable (and filterable) subset of pages.
This guide will cover how to create a basic search listing.
It won’t cover how to write and edit JSON blobs. Please contact a developer if you need guidance with this.
If you’re having issues with your search listing, please submit an SDP support ticket.
Jump to
- 1 Title
- 2 Introduction text
- 3 Summary
- 4 Custom header
- 5 Feature image
- 6 Listing configuration
- 7 Global filters
- 7.1 Site
- 7.2 Content type
- 7.3 Custom filter
- 8 User filters
- 8.1 Field
- 8.2 Input label
- 8.3 Placeholder
- 9 Results
- 10 Search configuration
- 11 Below results content
- 12 Topic
- 13 Site
- 14 Standard vocabularies (in content.vic.gov.au )
Title
Enter the title for your search listing page. All pages are indexed by Google so make sure your page title accurately describes what the search listing is for. For example, ‘All Data Victoria news’.
This field is mandatory.
Introduction text
This text appears just below your title. It's not a mandatory field but we encourage users to include introduction text on every page. The introduction text should give a summary of what users can find or do on a page.
Summary
This field is mandatory
This is the meta description that appears in Google search results and on cards linking to the search listing page. Make sure the summary is optimised for search engines.
Custom header
Leave this blank. This is a custom feature for a specific custom search listing.
Feature image
To display an image when this page is linked via a navigation, promotion card or shared on social media, a feature image will need to be added.
Use the CMS menu to navigate to Content > Media > Add media and upload the image.
Then return to your search listing page, type the name of the image in the use existing media field and select it.
Listing configuration
Query configuration
This field is mandatory.
You will need to copy the below JSON blob and paste it into the Query Configuration box.
Other fields can be added, depending on the content types you want to include. You’ll need a site admin or developer help with the code.
If you receive an error with your query configuration, copy and paste it into an online JSON validator and correct the issue. Then paste the valid JSON back into the query configuration field.
{
"multi_match": {
"query": "{{query}}",
"fields": [
"field_landing_page_nav_title",
"field_landing_page_summary",
"field_landing_page_intro_text",
"field_news_intro_text",
"field_paragraph_body",
"field_overview_title",
"summary_processed",
"title",
"body"
]
}
}
Custom sort configuration
This field determines how the results show once a user has typed something in the search bar.
The table below has examples of the best sort configurations for each content type.
Once you know how you want your results to initially display, copy the text in the ‘code’ column and paste it into the custom sort configuration field.
Content types | Display order | Code |
---|---|---|
News | Date of news (latest news to oldest) | [{ "field_news_date": "desc" }] Â |
Publications | Date of publication (newest to oldest) | [{ "field_publication_date": "desc" }] |
Grants | Closing soonest (however ongoing grants will be mixed in with closed. We are working on getting a new code string that will show open and ongoing first, then closed). | [{ "field_node_dates_end_value": "desc" }] |
Events | Happening soonest to latest | [{ "field_event_date_start_value": "asc" }] |
Landing pages | Latest created date to oldest | [{ "created": "desc" }] |
If you leave this field blank, the results will display by the order they were added to the search engine. This is essentially random, so it is recommended to select a string from the above table.
When the user types anything in, the results will adjust to display what matches the terms best in the query configuration.
Search input placeholder
This text appears in the search bar before the user has typed anything.
It is not mandatory.
If you leave this field blank, there will be no text in the search bar before the user starts typing.
Having search input placeholder text can be helpful for some users but has several issues for accessibility, so we discourage its use.
Search submit label
This field currently doesn’t show on the front end.
Do not put anything in this field.
Results per page
This controls the maximum number of results shown per page.
If you leave this blank, it will display 10 results per page.
You can type in the field or use the up and down arrows to change the number of results.
Global filters
Use these filters to control the site and content types that will be displayed in the search listing.
Select Add paragraph to select either Content type or Site.
For example, you could set it to show ‘Recycling Victoria' (site) and ‘news’ (content type)'. Your listing will now display all of Recycling Victoria’s news pages.
Site
Select the site or site section(s) that you want your listing to display results from (e.g. Recycling Victoria).
You must select at least one site.
Content type
Select the content types that you would like to show in your listing.
You can select multiple. For example, in your listing, you may want only landing pages and publication pages to appear in your results.
If you don’t select any content types, then all content types from the selected site will display.
Custom filter
You can add additional global filters here that aren’t available via the drop-downs.
For example:
{
"terms": {
"field_content_category_name": ["Tool"]
}
}
This tells the search listing to only show results that have the content category ‘Tool’ checked.
Capitalisation and formatting is important here - the taxonomy terms must be typed exactly as they are saved in the CMS or results won’t show.
User filters
Select add paragraph and add searchable fields.
This section appears when a user presses ‘refine search’ on the front end.
Use this section if you’d like your users to be able to further filter results by department, topic, tags and more.
Field
In the field field, select the additional filter you would like the user to be able to use.
You can only select one. If you choose ‘topic’ for example, then all topics will appear in the dropdown box.
Input label
This field is mandatory if you intend to use user filters, as it tells your user what the filters relate to.
This text appears above the drop-down box.
Use it to direct the user to take action. For example ‘Select a topic'.
Placeholder
The placeholder field goes in the drop-down box until the user makes a selection.
It is best to actually leave this field blank as the user may already think it is filled in if you put text here.
Results
Search listings display as a single-column page only (no side menu or other sidebar info).
Results listing page layout variants:
default or simple - see the Ripple design system guide on the results listing
results simple - example: 150 years: school profiles (includes URL, summary, date updated)
results default - example: (with icons) Grants and programs (includes grant audience, whether open or closed, value)
(name TBC) results minimal - example: Departments and agencies (includes name with hyperlink)
cards (looks like content collection)
cards using news content type - example: Victims of Crime news
cards using events content type - example: What’s on at the Shrine
cards using custom profile content types - example: Aboriginal Honour Roll
This is where you control how the search results are displayed.
You will need to select a layout component and a results component or your search listing will not display.
There are only a few approved layout and result combinations. Please see the table below for approved combinations.
Results configuration
Leave this field blank.
Layout component
This controls the layout of your results.
For a grid layout (TideSearchResultsGrid), then you must select TideSearchResultCard as the results option.
For a list layout (TideSearchResultsList), you can select TideGrantSearchResult or TideSearchResult as the results option.
TideSearchResultsTable does not currently work. Do not select it.
See the table below for examples of how these display.
Results component
You have 3 options for the results component, which determine what shows on each individual result:
TideGrantSearchResult
This will present results like they are grant pages. This is not recommended unless your search listing is specifically about grants and must be paired with TideSearchResultsList layout.
It includes title, URL, summary, date updated and grant status (open/closed/ongoing).
TideSearchResult
This displays results as a basic listing.
It includes title, URL, summary and date updated.
TideSearchResultCard
This result option can only be used with TideSearchResultsGrid layout.
This will display results as cards. The card will include feature images if they are enabled on the destination pages. According to the result content type, it may display tags such as ‘News’ or ‘Event’.
Approved layout and results component combination examples
Layout component | Results component | How it displays | Notes and suggested usage |
---|---|---|---|
TideSearchResultsGrid | TideSearchResultCard | Â |
|
TideSearchResultsList | TideGrantSearchResult | Â |
|
TideSearchResultsList | TideSearchResult | Â |
|
Search configuration
Leave this field blank.
Below results content
This text will appear below the results and page number pagination icons.
Use this section for extra information about the listing, linking to other pages (such as return to home, since the page has no side navigation) or adding disclaimers.
Topic
Select a topic, this field is mandatory.
Site
Make sure the correct site or site section is selected.
Â
Standard vocabularies (in content.vic.gov.au )
Existing attributes vocabularies available in most content types are:
topic (subtopic to come)
department
content category
grants audience, grants status (only available when grants content type used)
tags (content audience)
organisations (to come)
language (to come)
Read about our standard vocabularies
Our core content types are landing page, publication, news, grant, event.
Â