此用例的视图或有机组

发布于 2024-09-12 06:11:03 字数 749 浏览 1 评论 0原文

这与我之前问过的另一个问题有关。

我正在使用视图向用户呈现节点列表。然后,用户必须选择他们最喜欢的 3 个选项,然后我将其保存到一个子列表中,我需要记住该子列表以便稍后向用户显示。

我打算使用 Flags 来标记用户的选择。我现在意识到这不会很好地工作,因为我可能需要向用户呈现超过 1 个列表,并让他从每个列表中选择前 3 个选项。问题是列表之间可能存在重叠,因此标记不准确。

例如,第一个列表可能是:

Tom
Samantha
Jack
Amanda
Dave
Rory
Ted

第二个列表可能是这样,其中 RorySamantha 与第一个列表重叠:

Rory
Hugo
Samantha
Ryan
Bill

如果用户需要选择 Rory 作为两个列表中的前 3 名之一(或者想要在第一个列表中选择 Rory,但不在第二个列表中),针对每个用户进行标记是行不通的。

为了创建用户的选择列表,我正在考虑:

  • 让用户自己创建一个视图。这可能吗?如何实现?
  • 或者使用我对此知之甚少的有机基团。所以我的问题是:他们是否更适合帮助我解决这种情况?

This is related to another question that I asked before.

I'm using views to present to the user a list of nodes. The user then has to pick their top 3 choices, which I then save to a sub-list that I need to remember to show to the user later.

I was going to use Flags to mark the user's choices. I now realized that this isn't going to work well, because I may need to present to the user more than 1 list and get him to choose his top 3 choices from each. The problem is there may be overlap between the lists, so flagging wouldn't be accurate.

For example the first list may be:

Tom
Samantha
Jack
Amanda
Dave
Rory
Ted

and the second list may be this, where Rory and Samantha are overlaps from the first list:

Rory
Hugo
Samantha
Ryan
Bill

If the user needs to choose Rory as one of the top 3 in both lists (or wants to choose Rory on the first list, but not on the second list), flagging per user wouldn't work.

To create the user's list of choices, I was thinking to either:

  • let the user create a view themselves. Is that possible and how?
  • or use organic groups, which I know very little about. So my question here: are they better suited to help me with this sort of scenario?

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

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

发布评论

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

评论(2

探春 2024-09-19 06:11:03

您确实不想让任何人在没有大量抽象的情况下创建自己的视图。我认为您不会获得仅使用视图或有机组所看到的功能。

您应该看看 Core 的 poll 模块是如何做到这一点的。它具有类似的功能(允许用户从不同的列表中选择一个或多个选项)。缺点是您可能必须使用自己的 CRUD 创建自己的模块。

但是,您可以使用 Views API 来生成选项列表并将视图 ID 与用户的选择一起存储,而不是允许用户创建自己的选择的轮询功能。

You really don't want to give anyone access to create their own views without a lot of abstraction. I don't think you're going to get the functionality you see with Views only or Organic Groups.

You should take a look at how Core's poll module does this. It has similar functionality (allow users to select one or more choices from distinct lists). The short of it is that you're likely going to have to create your own module with its own CRUD.

But, instead of Poll functionality, which allows a user to create his or her own choices, you could use the Views API to generate the list of choices and store the view ID with the user's selection.

秋凉 2024-09-19 06:11:03

我还是觉得Flag应该没问题。您可以创建多个标志。因此,您可以创建 List-1-Flag 和 List-2-Flag。

您可能会遇到的一个单独的问题是强制执行限制,即允许用户仅标记三个节点,并且每个列表中不能多/不能少。

I still think Flag will be okay. You can create multiple flags. So you can create a List-1-Flag and List- 2-Flag.

A separate problem you are likely to encounter will be to enforce the limit of allowing the user to only flag three nodes and no more/no less from each list.

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