Hi everyone,
I’m working on a page in Umbraco that has several subpages (not exactly a blog, just a main page with child pages). I’d like to set up a custom search feature on the main page that works as follows:
Left Side: A navigation menu listing all subpages of the current page.
Right Side:
A search field where users can type a keyword.
A dropdown labeled “Search in:” with two options: “Pages” or “Documents.”
If the user chooses “Pages” and enters a keyword, the search should:
Only look through the subpages of the current page (not the entire Umbraco site).
Display the results below the search field.
Each result should include:
The page title.
A short excerpt of the content where the keyword appears (ideally highlighted).
A breadcrumb or some indication of where this page sits in the hierarchy.
If the user chooses “Documents”, the search should:
Look through PDF files (or other documents) associated with these subpages.
Display similar information, ideally showing the name of the document and highlighting where the keyword is found.
I already have the page and some subpages set up in Umbraco. Now I need to integrate this search module/component. Does anyone have tips, best practices, or a sample project to show how to implement such a search in Umbraco?
Any guidance or advice would be greatly appreciated!
Thank you!