Closed github-learning-lab[bot] closed 4 years ago
:white_check_mark::x::x::x::x::x::x:
:white_check_mark: Getting the files
:x: There's something wrong with your searchlanding.json
file
:x: You didn't define the store.custom#landing
route and its path
:x: You didn't define a store.custom
block
:x: You didn't use image
block on the store.custom
blocks and define it with a src
and minWidth
of 100%
:x: You didn't use a search-result-layout.customQuery
block on the store.custom
blocks and defined it
:x: You didn't define all the expected search-result-layout.customQuery
props
:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:
:white_check_mark: Getting the files
:white_check_mark: Code compilation
:white_check_mark: Define a new route
:white_check_mark: Define a store.custom
block
:white_check_mark: Use image
block on the store.custom
blocks and define the banner
:white_check_mark: Use search-result-layout.customQuery
block on the store.custom
blocks and define it
:white_check_mark: Define the customQuery props
Building a custom search landing page
:sparkles: Branch: landing
Introduction
In the previous step, we looked at creating a custom template. In scenarios involving promotions and commemorative dates, it's quite common to create special landing pages.
Custom searches
We saw that the search deduces what is needed from the given context. On a custom page however, the context doesn't exist and you need to state which query should be performed to get the results. All this is made possible by the
search-result-layout.customQuery
.Query schema
The query schema is one of the custom query search result props that allows you to control the search that the landing page should run. To know more the query schema's possibilities, read through its documentation.
Activity
Define a new path (
store.custom#landing
) inroutes.json
;Create a new file called
search-landing.jsonc
in the blocks folder;Create a new custom template entitled
store.custom#landing
;Define the
image
block as one of this template's blocks. This block must haveminWidth
props of 100% and an image of your choosing.Repeat the same with
search-result-layout.customQuery
:Define the
search-result-layout.customQuery
block as the querySchema prop that:If you're still unsure as to how to send your answers, click here.