Adding new results template to the search block

The search block has an option to select different results templates.
What's the best approach to adding additional results templates?

It reuses the variations for the Listing block, so you can use the documentation on how to extend the listing block.

Note, in the tutorial above you'll see:

Create src/components/manage/Blocks/Listing/CardsTemplate.jsx

You can have any path, no need to make it that deep. Just import the component and plug it into the configuration.

2 Likes

Thanks @tiberiuichim

You could use existing addon which would add templates there or you can create a new one, I created the [volto-advanced-variations] it has several options on what/how to display the results, I copied codesyntax/volto-listingadvanced-variation and changed it from there.

2 Likes