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.
- volto-advanced-variations - Based on codesyntax/volto-listingadvanced-variation this addon adds events options including dates, times and location, displaying the listing or search as a carousel/slider or background image.
- volto-fullcalendar-block - A block for adding a FullCalendar to display events from an ics/iCal file
- volto-carousel-block - A carousel block, with slick integration
- volto-listingadvanced-variation - Adds a new variation to the listing block with advanced configuration options.
2 Likes