简体   繁体   English

具有视图和CCK字段的Drupal 6高级搜索表单

[英]Drupal 6 Advance Search Form with Views and CCK fields

I am looking for Advance search module that'll expose CCK fields for search. 我正在寻找将公开CCK字段进行搜索的高级搜索模块。 I know using Views2 we can expose the CCK fields as a filter. 我知道使用Views2可以将CCK字段公开为过滤器。 However its not possible to convert CCK text fields as checkboxes. 但是,无法将CCK文本字段转换为复选框。 For eg I have added and exposed filter of group Search (Search: Search Terms). 例如,我已经添加并公开了搜索组(搜索:搜索字词)的过滤器。 To assist I want to add 2 check-boxes like search in Title and/or Description which are CCK Text fields. 为了提供帮助,我想添加2个复选框,例如在“标题”和/或“描述”中搜索,它们是CCK文本字段。 I couldn't find way to change them as check-boxes with functionality search in Title and/or Description CCK fields. 我找不到在Title和/或Description CCK字段中通过功能搜索将其更改为复选框的方法。

Similarly, I want to add other assisting search fields like Search in Price Text filed with min-max (in- between)values, zip code + Geo-proximity search filters. 同样,我想添加其他辅助搜索字段,例如,以最小-最大(中间)值归档的价格文本中搜索,邮政编码和地理位置邻近搜索过滤器。

Could you please suggest me some module or hint to achieve this? 您能否建议我一些模块或提示来实现这一目标?

Have you tried Better Exposed Filters . 您是否尝试过更好的暴露过滤器 It will allow you to use checkbox / radio elements 它将允许您使用复选框/单选元素

[Edit] [编辑]

You may have to resort to using a hook_form_alter and hook_views_query_alter 您可能不得不求助于hook_form_alter和hook_views_query_alter

In the form alter you can add elements to the filter form, and then in the views_query_alter you can change the query depending on the form values. 在表单alter中,可以将元素添加到过滤器表单中,然后在views_query_alter中,可以根据表单值更改查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM