Drupal: can I place a views filter (Search items) in a website block?

我是研究僧i 提交于 2020-01-06 15:50:49

问题


I'm using Drupal and in the "Filters" list there is also the "Search Term" filter which works great.

I use it to search a specific node in my Views list.

However such field only displays when I'm in the view page, but I would like to display on any page of my website (let's say as a block) (and when I search for something, the view page is loaded with the filtered nodes.

Do you know how could I make it ? thanks


回答1:


In your view configuration page there should be a field: Exposed form in block. If this is checked then views will create a block with the filters on it rather than embedding it in the view itself. This block can be placed from the block configuration screen and you can make it show on any pages that you want.

I think the option lived under the Filter section in Views 2, in Views 3 it's in its own place called Exposed Form.



来源:https://stackoverflow.com/questions/4708473/drupal-can-i-place-a-views-filter-search-items-in-a-website-block

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