一对多成员与文章的关系

发布于 2024-10-19 16:04:02 字数 443 浏览 1 评论 0原文

我们是 Expression Engine 的新手,可能需要任何使用此 CMS 构建过一些网站的人的帮助。

我们有一个小型仪表板系统,用户可以登录并阅读其他作者提交的文章。我们希望有一个表单,允许会员在登录时选择他希望在主页上显示哪些类别的文章。然后我们想弄清楚如何实际创建该主页,以便只有用户选择的文章类别是可见的。

从数据库的角度来看,这似乎是成员和类别之间的一对多关系,但我们不清楚如何在 EE 内部实现此目的(无需原始 PHP/查询),特别是使用 Member 模块,因为它不是一个渠道,似乎不允许在成员自定义字段中创建关系。

我们考虑为每种类别类型创建一个自定义字段,但大约有 95 个类别类型,当我们添加或删除它们时,试图跟上所有类别类型将非常麻烦。即使我们这样做了,我们仍然不确定如何将 1 个成员连接到多个类别或通过一个类别连接多个条目。

我们稍后将更新问题以添加我们提出的一些代码(如果有)

We are new to Expression Engine and could maybe use some help from anyone who has built a few sites using this CMS.

We have a small dashboard system where users log in and read articles that are submitted from other authors. We are wanting to have a form which allows a member to chose which categories of articles he would like to be on his home page when he logs in. Then we'd like to figure out how to actually create that home page so that only the categories of articles that the user has chosen are visible.

From a DB standpoint this seems to be a one to many relationship between a member and categories, but we don't have a clear idea how to accomplish this inside of EE (without raw PHP/queries), especially using the Member module, since it isn't a channel and doesn't seem to allow creating relationships in the member custom fields.

We looked at creating a custom field for every category type, but there are about 95, and as we add or remove them, it would be extremely cumbersome to try to keep up with them all. Even if we did we still aren't sure how to connect 1 member to many categories or many entries via a category.

We'll update the question later to add some of the code we (if any) that we've come up with

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

音盲 2024-10-26 16:04:02

简而言之,不会有内置的方法来处理这个问题。但这并不是说某些现有的模块无法处理此问题。让我问你这个。当您有用户登录时,他们是登录到 Expression Engine 本身的后端,还是您在面向公众的网站上创建的登录系统。

In short, there isn't going to be a built in way to handle this. That isn't to say however that this can't be handled with some modules that are already out there. Let me ask you this. When you have users logging in, are they logging in to Expression Engine itself's backend, or the login system that you have created on a public facing website.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文