hello everyone,
i want to implement search functionality in kirby so from the official documents https://getkirby.com/docs/cookbook/search i create on empty file search.txt and created search.php in templet file.
here is my code of search form.
i am getting perfect value that i have searched in search bar at templet page when i press enter
by doing this i am getting black page with error in console.
if i need to search that keyword in whole site, am I on right way?
now i am getting path of content files without using foreach .
i just simple echo results and getting all the files name which contains that keywords from content part.
You are echoing an object. You have to use a foreach loop to loop through the results.
Edit: Please wrap code blocks within three backticks (`) each on a separate line before and after the code. You can inspect your last post by clicking on the pencil icon to see what it should look like. Thanks for your understanding, it makes code much more readable.