一对多成员与文章的关系
我们是 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简而言之,不会有内置的方法来处理这个问题。但这并不是说某些现有的模块无法处理此问题。让我问你这个。当您有用户登录时,他们是登录到 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.