简体   繁体   English

一对多的成员与文章的关系

[英]One-To-Many member-to-articles relationship

We are new to Expression Engine and could maybe use some help from anyone who has built a few sites using this CMS. 我们是Expression Engine的新手,可能会从使用此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. 从数据库的角度看,这似乎是成员和类别之间的一对多关系,但是我们尚不清楚如何在EE内部完成此工作(没有原始PHP /查询),尤其是使用Member模块,因为它不是渠道,并且似乎不允许在成员自定义字段中创建关系。

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. 我们曾考虑为每种类别创建一个自定义字段,但是大约有95种,并且在添加或删除它们时,试图跟上所有这些都将非常麻烦。 Even if we did we still aren't sure how to connect 1 member to many categories or many entries via a category. 即使我们做了,我们仍然不确定如何将1个成员连接到多个类别或通过一个类别的许多条目。

We'll update the question later to add some of the code we (if any) that we've come up with 稍后我们将更新问题,以添加一些我们提供的代码(如果有)

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. 当您有用户登录时,他们是登录到Expression Engine本身的后端,还是您在面向公众的网站上创建的登录系统。

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

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