Drupal:如何使用分类法来实现我的想法

发布于 2024-08-16 18:32:11 字数 319 浏览 8 评论 0原文

我有一堆 Bout 节点。每场比赛都与一所学校以及就读该学校的球员相关联。我认为通过分类学来建立这种关联将会起作用。 (学校和球员是从一个随着时间的推移保持相当稳定的列表中抽取的。)

一个想法是让学校名称作为父术语,而球员作为子术语:

Princeton University
    Jorma
    Akiva
    Andy

这在执行完整性约束方面有效吗? (每场比赛必须与一所学校和一名球员相关联。)或者我最好使用不同的分类结构吗?不同的词汇? (但我想维持一种球员和学校之间的联系。给定一个学校,我希望能够检索到相应的球员。)

I have a bunch of Bout nodes. Each Bout is associated with a school, and a player who goes to that school. I am thinking it will work to do this association through taxonomy. (The schools and players are drawn from a list that remains fairly constant over time.)

One idea is to have the school name be the parent term, with players as children terms:

Princeton University
    Jorma
    Akiva
    Andy

Would this work, in terms of enforcing integrity constraints? (Each bout must be associated with one school and one player.) Or am I better off using a different taxonomy structure? Different vocabs? (But I want to maintain a way the connection between players and schools. Given a school, I want to be able to retrieve the corresponding players.)

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

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

发布评论

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

评论(1

零時差 2024-08-23 18:32:11

我会将节点和玩家放入节点中,并使用(必需的)节点引用 CCK 字段将它们全部绑定在一起。 Node Referrer 模块 允许您按照您的意愿以两种方式使用这些节点引用去做。

I'd make nodes and players into nodes, and use (required) node reference CCK fields to bind them all together. The Node Referrer module allows you to use those node references in a two-way manner as you seem to want to do.

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