Custom Site Search Widget on Home page

Am trying to add a global search block on the homepage. I created a customsearch block and added it to home page.

/src/components/Blocks/CustomSearch/View.jsx

import React from "react";
import {SearchWidget} from '@plone/volto/components';

const View = (props) => {
  return <div> <div className="search">
  <SearchWidget />
</div></div>;
};

export default View;

I would love to use the more feature rich search block that shipped by default in Volto but the issue is that results results are always displayed with it. Wonder if you have any suggestion to customize this further.

I think you want your own custom "search input block" ? Here's something along those lines: SearchInput.jsx · GitHub

1 Like

Thank you @tiberiuichim!

Make sure to check the "group" property for the block config, I have it listed in a "layout" group, which you probably don't have.

1 Like

Plone Foundation Code of Conduct