Adding Search functionality to site


Just wondering if there is a way to add search functionality to a site that searches not just database content but what you might call static pages on a simple site. Or am I better off just using Google Custom Search on my site?


for static, if you mean something that is hard coded in a file, so you must search in your specifics pages(files) and return the result.

google is good also but i dont like to use it for search purpose in my own website.

Ahh k. Does Yii2 actually help with that process of searching through the files and building up the result? If not, I think I will pay for the Google Custom Search, it will be adequate for my purposes.

Thanks for response!

i dont think, but maybe something like beforeAction can help you to check and go through some specific actions and return the result if you have a search parameter …

but in a huge project, this method may annoy you