欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

view 的 exposed filter form 作为一个区块放到页面上

shiping1 的头像
http://www.google.com.hk/webhp?hl=zh-CN#hl=zh-CN&newwindow=1&q=views++exposed+filter+block&safe=strict
google "drupal 6 views exposed filter block"

Views 3 Exposed filters as a Block

By Sil, 09/17/2011 - 00:06
Exposed paint as illustration

Here is a quick how-to on how to have your exposed View 3 filters as a block in Drupal 7. 

This one is fun and easy, and the most important piece of information is:

install Views 7.x-3.x-dev

Because that version of Views 3 will allow you to set the 'Exposed form in block' to 'Yes'. (it is under 'Exposed Form' and yes, it's that simple)
Views 7.x-3.0-rc1 doesn't have that option, so untill there is a Release Candidate (or full release) that has this exposed block option, the only way to do it is to use the dev version.

Here are the steps you should take to show the exposed filters as a block:

Step 1) Enable the block in your View

Views exposed block setting

 

 

Clicking yes/no will give you this option:

Views Exposed filter choices

 

Step 2) Put the exposed filter block where you want it to be

(the block administration page is at example.com/admin/structure/block)

Views Exposed filter block on blocks settings page

Step 3 ) Test the result

('Expose this' is the View title)

Views Exposed filter block on the front page

 

Hope that saved you some time puzzeling how to do it. Happy Drupalling!

 

Category:
 
普通分类: