问题
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