タググループとカテゴリタグ制限で構造化タグを設定する

タグサポートはDiscourseのコア機能です。このハウツーでは、Car Talkが使用しているようなタグスキーマの設定について説明します。

達成したいことは以下の通りです。

  • 自動車のメーカーと車種のタグ。
  • 特定のカテゴリでのみ、自動車のメーカーと車種のタグの使用を許可する。
  • 車種のタグは、対応する自動車メーカーのタグが使用されている場合にのみ選択できるようにする。

前提条件

まず、設定でタグを有効にする必要があります。

タグの使用方法について厳格なスキーマでは、ほとんどのユーザーが新しいタグを作成できないようにすべきです。

タググループ

タグインデックスページ(/tags)に移動します。「タググループの管理」を右上隅のメニューから選択します。

トップレベルタグ

まず、人々が最初に入力したい自動車メーカーのタグを作成しましょう。

タググループページで:

  1. 新しいグループを作成します。

  2. タイトルを付けます。

  3. グループに属するタグを追加します。既存のタグを追加することも、このページから新しいタグを作成することもできます。

  4. トピックごとに1つの自動車メーカータグのみを使用させたいので、この制限を追加するチェックボックスをオンにします。

  5. グループを保存します。

親子タグの関係

次に、自動車メーカーごとにグループ化される車種のタグを定義します。自動車メーカーごとに1つのグループがあります。

前回と同様に適切な名前を付けて別のグループを作成します。今回は親タグを追加します。この例では、ホンダの車種グループを定義し、親タグとしてhondaを使用します。

結果

この時点で、トピックにタグを付けると、これらのルールが適用されます。タグを追加しようとすると、最初のタグは自動車メーカーのタグのいずれか(または、使用に制限のないその他のタグ)のいずれかである必要があります。

2番目のタグは、選択したメーカーのタグに対応するモデルタグのいずれかになります。

可視性と使用制限

必要に応じて、タグの可視性または適用権限を特定のユーザーグループに制限できます。

カテゴリの制限

特定のカテゴリでのみ自動車のディスカッションを行いたい場合は、カテゴリ設定からすべての自動車メーカーおよび車種タグの使用を制限できます。

カテゴリ設定の「タグ」タブで、グループを追加します。

これらのタグが許可される他のカテゴリがある場合は、それらのカテゴリの設定で同じ方法で追加できます。

これで完了です!

追加リソース


最終レビュー:@Canapin 2023-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