Posted by googlg on February 20, 2013 at 6:52am
在官网上搜索theme 或 module时,有按,条件查询的方式:应该是在一个block中实现的,想问题这种下拉列表是怎么实现的呢???
Filter by compatibility:
Status:
Search Themes:
Sort by:
在官网上搜索theme 或 module时,有按,条件查询的方式:应该是在一个block中实现的,想问题这种下拉列表是怎么实现的呢???
Filter by compatibility:
Status:
Search Themes:
Sort by:
Comments
可以通过views实现
创建views page之后,在 "FILTER CRITERIA" 里面先添加需要过滤的字段,然后找到 "Advanced" —— "EXPOSED FORM" —— "Exposed form in block" 设置为 yes 即可。接下来就可以去 admin/structure/block 启用刚刚配置好的block了
过滤搜索列表,还是一个views的搜索列表?/ Filtering search listings or views?
你好googlg,
如果你想开发一个类似的网站高级搜索功能,这还挺复杂的。建议可以先看看这个模块:Searc API。
我没记错的话,Drupal.org 上的这个搜索功能使用的应该是Apache Solr search,相应的模块是Search API Solr search。要在block中以下拉菜单的形式显示过滤内容以及搜索标准,你还可以了解一下Facet API模块。
这里实际上是一个高级搜索功能,如果你只是实现类似在列表页面区块的下拉式的搜索,可以用Views模块来实现。 在views filter里面,exposed,那这个条件就会在搜索的block中显示出来。
所以我想你可能得先明确一下具体的搜索需求,再描述一个这个具体需求。
希望可以帮到你学习搜索列表功能。
Hi googlg,
If you would like to develop advanced search functions for a website, this is a rather complicated requirement, but I would recommend you start by looking at:
Searc API.
The search on drupal.org is using Apache Solr search if I recall properly and there is a corresponding contributed module: Search API Solr search.
For displaying filters and search criteria in blocks with dropdowns, you could probably take a look at the Facet API module.
This actually implements advanced search capabilities, but actually, if you just wanted to have filters with dropdowns, in blocks on listing pages, this could already be achieved with the Views module using exposed filters, displayed in blocks.
First, I think you need to read and investigate this requirement in more details, then try to explain and describe in more details what you would like to achieve exactly.
Feel free to let us know if you would have any more questions related with this requirement, we would be glad to provide more information.
Hope that helps and gets you started on filtered listings.
Cheers!