ExpressionEngine条目可以支持一对多关系吗?
我正在为一位客户构建一个烹饪网站,他决定使用 ExpressionEngine(不是我的选择,我确实尝试过选择不同的东西)。该网站的一方面是登录会员能够添加食谱。
到目前为止,我已经创建了一个食谱频道和一个原料频道。然后,我扩展了 Member 模块并使用 Safecracker 模块创建了一个 SAEF,以便登录用户可以添加菜谱条目。然而,我陷入困境的是试图创建一对多关系,其中一个食谱可以有许多成分,并且一种成分可以属于许多食谱。
ExpressionEngine 是否支持开箱即用,而我却错过了它?或者我必须做一些黑客工作吗?或者我是否以完全错误的方式讨论这个问题?
任何帮助将不胜感激。
I'm building a cookery website for a client, who's decided to use ExpressionEngine (not my choice, I did try and opt for something different). One aspect of the website is the ability for logged-in members to add recipes.
So far, I've create a channel for recipes and a channel for ingredients. I've then extended the Member module and create a SAEF with the Safecracker module so logged-in users can add a recipe entry. However, where I'm stuck is trying to create a one-to-many relationships, where a recipe can have many ingredients, and an ingredient can belong to many recipes.
Does ExpressionEngine support this out of the box and I'm missing it? Or does I have to do some hacking? Or am I going over this in completely the wrong manner?
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好的选择是使用名为 Playa 的第 3 方商业附加组件(“Playa”是对 1 的有趣诠释) -对多关系)。它来自 Pixel & Tonic 将会完全满足您的需求。他们的附加组件和支持是一流的。
这样,您的客户将拥有他们所需的功能,并在后端控制面板和前端保险箱表单中提供最佳界面。与针对 EE 核心的黑客攻击相比,此操作不需要黑客攻击,而且随着时间的推移,可维护性会更加可靠。
Your best bet is to use a 3rd party commercial add-on called Playa ("Playa" being a playful take on 1-to-many relationships). It's from Pixel & Tonic and will do exactly what you need. Their add-ons and support are top-notch.
That way your client will have the feature they need with an optimal interface on both the back end control panel and within the front-end safecracker form. No hacking needed for this and maintainability is much more solid over time as opposed to hacking at EE's core.