设置结构化标记,包含标签组和分类标签限制

Tag 支持是 Discourse 的核心功能。在本操作指南中,我将介绍如何设置一个像 Car Talk 使用的标签方案。

我们希望实现以下目标:

  • 针对汽车品牌和汽车型号设置标签。
  • 只允许在特定分类中使用汽车品牌和型号标签。
  • 只有在使用匹配的汽车品牌标签时,才能选择汽车型号标签。

先决条件

首先,我们需要在设置中启用标签:

在一个对标签使用方式有严格要求的方案中,我们应该阻止大多数人创建新标签:

标签组

转到标签索引页面(/tags)。从右上角的菜单中选择“管理标签组”。

顶级标签

首先,我们创建汽车品牌标签,这是人们应该首先输入的标签。

在标签组页面上:

  1. 创建一个新组。

  2. 为其命名。

  3. 添加应属于该组的标签。您可以添加现有标签,或从此页面创建新标签。

  4. 我们只希望人们在每个主题中使用一个汽车品牌标签,因此请勾选以添加此限制的复选框。

  5. 保存该组。

父子标签关系

现在我们将定义汽车型号标签,它们根据汽车品牌进行分组。每个汽车品牌将有一个组。

像以前一样创建一个带有适当名称的另一个组。这次我们添加一个父标签。在此示例中,我们定义本田汽车型号组,并使用 honda 作为父标签。

结果

此时,标记主题将遵守这些规则。在尝试添加标签时,第一个标签只能是汽车品牌标签之一(或对使用位置没有限制的其他标签)。

第二个标签可以是与所选品牌标签匹配的型号标签之一。

可见性和使用限制

如果需要,您可以将标签的可见性或应用权限限制为特定的用户组:

分类限制

如果我只希望在特定分类中进行汽车讨论,我可以从分类设置中限制所有汽车品牌和型号标签的使用。

在分类设置的“标签”选项卡中,添加组。

如果我在其他分类中也应允许使用这些标签,可以在那些分类的设置中以相同的方式添加它们。

就这样!

附加资源


最后由 @Canapin2023-05-22T22:00:00Z 复审

71 个赞
Using tags instead of subcategories for a car forum
(How) Can we increase the tags limit?
Categories with allowed Tag Groups
Tagging rights for specific users?
Tagging a topic from email in
Large number of forums / categories / groups?
Is it possible to make tags mandatory?
Topic Title Flair - or something like that?
Empower moderators to restrict tag groups | Nested tag structure | Navigation bar
How might we better structure #howto?
Educating users about tags
Several questions about management right
Kanban Board
Categories vs tags: is this even possible?
Help with Tags that can only be created by the Moderators but used by everyone
Using tags to categorize city specific questions
User-defined keyword for each thread
Best practices to manage events inside a category
Default tags for users
Default tag for new topics?
Structuring an active support community migrating from Facebook
How to Find Your Community's Most Commonly Asked Questions
Best element to use for pulling featured posts
Editing topics with tag groups from parents allows incorrect tagging
How can I make sure only admins/mods are able to create featured posts?
Is it possible to make tags mandatory?
Not Able To Post New Topic Using Tags - Error
Filter Tags on change Category
Uploading Tag for specific categories
About topic tags
Tag Group URLs
Getting certain posts to Zapier
I Need a category link to take me to a tags page
Staff tags missing in settings?
Feedback on my forum
Anchors to headings do not always work
How to create a help web page for my community site in two levels
Help with Tags that can only be created by the Moderators but used by everyone