Drupal 6:分类法在托管领域中蔓延?
因此,您有两个分类法,即:“业务类型”和“位置”,
这被分配给名为“业务”的节点。 实际上,当用户创建业务节点时,她必须选择位置“纽约”并输入“信息服务”。 我的问题是当: a) 获取分类法,以及 b)显示分类法
我希望这两个术语彼此分开。 即,我希望能够在“管理字段”视图中移动这两个术语的单独位置,以便可以将它们分组或单独放置。 目前,Drupal 只允许一个条目,称为“TAXONOMY”,它实际上是彼此相邻的两个术语。
这就是我所拥有的: 替代文本 http://www.namhost.com/have.jpg
请记住,我需要能够将其与分层选择一起使用,这意味着内容分类不是一个选项。
So you have two taxonomies, namely: "Business Type" and "Location"
This is assigned to a node called BUSINESS. In effect, when the user creates a BUSINESS node, her has to choose for example, location "New York" and type "Information Services". My problem is when:
a) Capturing the taxonomy, and
b) Displaying the taxonomy
I want the two terms to be separated from each other. I.e. I want to be able to move the two terms individual positions in the MANAGE FIELDS view, so that they can be grouped or placed seperately. Currently, Drupal only allows one entry, called "TAXONOMY" which is effectively the two terms next to each other.
This is what I have:
alt text http://www.namhost.com/have.jpg
Bare in mind, I need to be able to use this with Hierarchical Select, which means Content Taxonomy is not an option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您必须将问题分为两部分:
我将在这里详细介绍第二部分,即有关显示的内容。
使用CCK 计算字段模块 并为要显示的每个词汇表创建一个字段。 将此字段放置在您想要的位置。
按如下方式配置每个字段:
taxonomy_get_textual_term_hierarchy_by_id() 函数特定于我的网站并定义在 DRUPAL_ROOT/sites/default/themes/mytheme/template.php 中,并以一种奇特的方式简单地重写分类术语文本以显示其整个谱系。 因此,我会得到类似“食物>沙漠>水果>苹果”的内容,而不是“苹果”。 我不会将其粘贴到此处,因为它超出了范围。
如果您的问题是在编辑表单中重新定位词汇,我建议使用内容分类模块。
You'll have to separate your problem in 2 parts:
I'll cover here more the second part, about displaying.
Use the CCK computed field module and create one field for each vocabulary you want to display. Position this field where you want them.
Configure each field as follows:
The taxonomy_get_textual_term_hierarchy_by_id() function is specific to my site and is defined in DRUPAL_ROOT/sites/default/themes/mytheme/template.php and simply rewrites the taxonomy term text in a fancy way to show its entire lineage. So instead of "apple" I'll get something like "food > desert > fruit > apple". I won't paste it here cause it is out of scope.
If your problem is to reposition the vocabulary in the edit form, I would suggest the Content Taxonomy module.
您被困在输入表单中一起出现的两个分类法中,它们作为一个包出现。 分类学应该用作分类系统(如动物界分类),以便术语在物理空间中属于一起。
但对于问题的另一半,请记住,您的用户将在输入表单中看到“业务类型”和“位置”标签,而不是您在管理字段时看到的通用“分类法”标签。
You are stuck with the two taxonomies appearing together in the input form, they come as a package. Taxonomy should be used as a classification system (like animal kingdom classifications) so the terms to belong together in physical space.
But for the other half of your question, keep in mind your users will see the 'Business type' and 'Location' labels in the input form, not the generic 'Taxonomy' label that you see when managing fields.
也许你可以用 ck 做得更好。 通过启用文本(随 cck 一起提供),您可以添加文本字段。 您可以轻松地单独使用它们,也可以将它们与视图、模板等一起使用。
maybe you could do better with cck. by enabling text (comes with cck) you can add text fields. and you can easily use them separately, use them with views, templates, etc.