Is there is any way to replace the default search module in Drupal

不羁的心 提交于 2020-01-06 14:01:34

问题


i am planning to create an custom search module in drupal .my aim is to replace the existing search feature (ie the default search ) is there is any way to override the default search feature ...


回答1:


You can implement hook_search and create your own search, and you can use Custom Search to set your default search and/or disable the standard ones.

You can also just use the Forms API and hook_menu and do something completely custom.

Also check out the accepted answer to Search hook for filtering results? for another idea.




回答2:


Sure there is! See this example: http://drupal.org/project/apachesolr




回答3:


I'm not sure of your Drupal background - but if you're new, you might like to know: you can do a lot with Exposed Filters in Views to provide search functionalitites. Depending on what you want to do, you could just de-activate the search module, and create a View with exposed filters for searching the appropriate content types and fields, and create a Block display for that view (on the left side of the UI, where you make a "page").



来源:https://stackoverflow.com/questions/5701761/is-there-is-any-way-to-replace-the-default-search-module-in-drupal

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!