This project is not covered by Drupal’s security advisory policy.

The taxonomy_ezfilter module is designed to give user a easy way to narrow listings with 1 or 2 level dropdown selections.

example:
We have some node types (such as blog, image, forum...) which have their own terms and are assoiciated a country/city vocabulary to maintain geographical information of nodes.

The site adminitstrator can select taxonomy_ezfilter module to use the country/city vocabulary to filter which node types in settings page. Then users will find a "[country][city](Go)" drop-down selections in selected node type's page. Users can filter contents on these page with the drop-down selections.

This module can filter any vocabulary with any other vocabulary. but now it support choose ONLY one filter vocabulary for whole site.

This module looks like taxonomy_filter, but there're many differences:
1. This module is easy to set by administrator, and user friendly by a drop-down selection filter.
2. This module process inheriting relations of terms in filter vocabulary automaticly.
3. This module works with sql_rewrite hook interface, though taxonomy_filter works with menu hook. So this module can perform in any page supporting sql_rewrite interface, such as forum/$tid or image/$tid, etc, and you don't need to change any url of your site. This module try to handle node lists in these page tansparently and smartly. Taxonomy_filter depend on its url specifically.
4. This module trace users filter setting in their session, so they set filter once, it works for them on related pages automaticly.

Note:This module won't change anything in the database; it just handle sql_rewrite hook to process view's SQLs.

Usage:
1. Install and active this module in common way.
2. Add a vocabulary for filter working. This vocabulary can be simple, or multi-levels. Assign it to node type what you want to filter.
3. In administrator's settings page, Set "EzFilter Vocabulary" to the vocabulary in step 2. You can configure level's title in "Define filter level" fields, such like level 1 title is "country" and level 2 title is "city". In "Define filtered type" fieldset, you can choice which types of node will be filtered. Only types assigned in step 2 will be listed here.
4. Done. Browsing pages of nodes which are your selected types, you will see a filter.
PS: When user change level 1 item, Level 2 selection will be filled by javascript automaticlly. If client is not support javascript, this module is still WORK. When user select level 1 item, he can submit firstly, then he will get correct selections in level 2 box -- Just need an additionally submit.

功能有些类似taxonomy filter,但是目的和实现完全不同。这个模块用来处理如下类似的情况:

例如,我们站上有一些节点类型(如blog, 图片,论坛),这些节点有自己的术语表和术语进行分类。另外,这些节点还与另一个“国家/城市”术语表相关联。则我们可以使用这个模块,只需配置此模块使用“国家/城市”术语表过滤指定类型的节点,用户就会在那些节点的页面上看到一个形如“[country][city](Go) ”的下拉选择器,用户可以在这些页面上快速过滤页面中的内容。并且“国家/城市”是继承关系,例如仅选择术语“中国”,则显示会包括“中国”术语下的所有子级城市。

这个过滤术语表可以是任何你需要的样子和内容,可以只有一级,也可以有多级,但是用户的选择框只有两级。在多级情形,用户选择两级过滤时的结果里包含了第二级及其所有的子级。但当前仅仅支持对内容使用一个过滤术语表。

注意:这个模块不会改变数据库中的任何数据内容——除了它自己的几个配置变量。它只是通过sql_rewrite hook处理页面的显示而已。

与taxonomy_filter模块的区别:
1、这个模块可以由管理员轻松设置,通过页面自动添加的下拉选择框使其易于用户使用。
2、这个模块可以自动处理过滤术语表的术语之间的继承关系,对“国家/城市/城区”之类的大小继承关系特别有用。
3、这个模块实现上是使用sql_rewrite hook接口,而taxonomy_filter使用菜单调用接口。因此这个模块可以在任何支持sql_rewrite hook调用的sql语句生成的页面上工作,例如forum/$tid,image/$tid等等,你不用改变站点原来的任何url。这个模块试图透明和智能的处理对页面的node/list的过滤。而taxonomy_filter则必须基于特定的url来工作。
4、这个模块在session中记录用户的过滤选择,因此用户选择一次就可以在页面跳转之间仍然保持自己的过滤选择,如果你限制用户只有一个session,那么用户会发现站点始终保持他的过滤选择。当然,用户也可以使用下拉选择框轻易改变自己的选择会取消过滤。

使用方法::
1、通常方式安装和激活taxonomy_ezfilter模块
2、按通常的方式为node type建立术语表。同时建一个过滤术语表,例如“国家/城市”的结构,可以单级结构,也可以多级结构,要求必选。
这样用户发布帖子时除了通常的术语选择或freetagging之外,还必须选择一个“国家/城市”信息。
3、在taxonomu_ezfilter设置中“EzFilter Vocabulary”选择第1步中设置的过滤术语表。
“Define filter level”中设定第一和第二级的标题,例如第一级叫“国家”,第二级叫“城市”,这两个名称会显示在下拉选择框里,这样用户才知道自己在选什么。
在“Define filtered type”中勾选要过滤哪些类型的节点,注意只有与过滤术语表相关联的节点类型才会列出来,如果这里什么也没有,请修改你的过滤术语表的关联节点类型。
4、浏览指定过滤的节点类型的页面,你会看到过滤选择框了。
注意:通常情况下,切换一级选择框时会由Javascript填充第二级选择框的可选项,但是,当客户端不支持Javascript时此模块同样能工作。此时先选择第一级提交,然后就可以选择第二级了——需要提交两次。

Project information

Releases