简体   繁体   English

使用 EE 搜索模块搜索自定义字段

[英]Use EE Search Module to search custom fields

I'm sure this is something simple for which I just haven't found the documentation:我确定这很简单,但我还没有找到文档:

I have a website with a member directory.我有一个带有会员目录的网站。 All of the member data is stored in a members channel, which uses a variety of custom fields – some of which are part of the P&T Field Pack.所有会员数据都存储在会员频道中,该频道使用各种自定义字段——其中一些是 P&T Field Pack 的一部分。

I use a Safecracker form to enter the data, and it renders the custom fields beautifully:我使用 Safecracker 表单输入数据,它可以漂亮地呈现自定义字段:

P&T 字段示例 1

P&T 字段示例 1

What I want is essentially the same form, but have it perform a search, instead of enter the field data.我想要的是本质上相同的表格,但让它执行搜索,而不是输入字段数据。

I've scoured the Search Module documentation, but can't find information on how to search individual fields, let alone how to render them.我搜索了搜索模块文档,但找不到有关如何搜索各个字段的信息,更不用说如何呈现它们了。 I've also searched the Safecracker documentation for how to configure it to search (the ideal solution).我还搜索了 Safecracker 文档,了解如何配置它进行搜索(理想的解决方案)。

How do I do this?我该怎么做呢?

Any help would be appreciated.任何帮助,将不胜感激。

Thanks!谢谢!

ty

EE's search module won't do what you want - it's more of a general search tool, and its "Advanced search" form is less about custom fields and more about things like channels and categories. EE 的搜索模块不会做你想做的事——它更像是一个通用的搜索工具,它的“高级搜索”表单与自定义字段无关,更多的是关于频道和类别之类的东西。

You want to look at Solspace's Super Search .你想看看 Solspace 的超级搜索 It's much more powerful, and will allow you to do exactly what you want in terms of your query - though you will have to build the form manually (ie, you won't get the SafeCracker-style simplicity of using {field:field_name} to have your form fields output for you).它更强大,并且可以让您在查询方面完全按照您的意愿行事 - 尽管您必须手动构建表单(即,您不会获得使用{field:field_name}的 SafeCracker 风格的简单性为您准备表单字段 output)。

I would also recommend checking out SuperSearch.我还建议您查看 SuperSearch。

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

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