Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Only site 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.

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 with the editor’s setup.

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 contact the SDP content team.


Jump to


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. Consult with the person/team that has requested this search listing to make sure their summary is optimised for search engines.


Custom header

This field currently has no impact on the search listing page. This may change in the future.

Leave this blank.


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.

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 language, department, topic/subtopic, 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.

If you do leave the placeholder text blank, make sure you have an input label.


Results

This section will allow you to determine how your results are presented to the user.

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.

If your client wants a grid layout (TideSearchResultsGrid), then you must select TideSearchResultCard as the results option.

If your client wants a list layout (TideSearchResultsList), then you can select TideGrantSearchResult and TideSearchResult as the results option.

TideSearchResultsTable does not currently work. Do not select it.

See the below table for examples of how these display.

Results component

You have 3 options for the results component, which determines 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, with no additional features.

    • It includes title, URL, summary and date updated.

  • TideSearchResultCard

    • This result option can only be used with TideSearchResultsGrid layout.

    • This will put a card around each listing result. It will display tags and feature images if they are enabled on those pages.

Approved layout and results component combination examples

Layout component

Results component

How it displays

Notes and suggested usage

TideSearchResultsGrid

TideSearchResultCard

  • Useful for news.

  • Displays feature images.

  • Displays type of content (eg grant) and their status (open or closed).

TideSearchResultsList

TideGrantSearchResult

  • Use this combination only for grants as it displays if every page is open or closed.
    This means it will say every ‘landing page’ is open.

TideSearchResultsList

TideSearchResult

  • Displays just the title, URL and summary text.

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 relevant pages or adding disclaimers.


Topic

Please select a topic, this field is mandatory.


Site

Make sure the correct site or site section is selected.

  • No labels