将用户标题关联到用户组

:bookmark: This guide explains how to link a user’s title to a group in Discourse, allowing users to click on the title to view the associated group page.

:person_raising_hand: Required user level: Administrator

This guide will walk you through the process of associating a user’s title with a specific group in Discourse. When set up correctly, clicking on the user’s title will navigate to the linked group’s page.

:information_source: In this example we’re using a user named anonymous, and a group titled Discourse.

Summary

To link a user’s title to a group, you’ll need to:

  1. Create a group and set a default title
  2. Add the user to the group
  3. Set the group as the user’s primary group
  4. Assign the group’s default title to the user

Step-by-step guide

1. Create a group and set a default title

  1. Navigate to the Admin area
  2. Go to the “Groups” section
  3. Create a new group or select an existing one
  4. On the group’s “Membership” page, set a “Default title”

2. Add the user to the group

  1. Go to the user’s profile page
  2. Click on the “Admin” button
  3. In the “Groups” section, add the user to the desired group

3. Set the group as the user’s primary group

  1. On the user’s admin page, find the “Primary Group” dropdown
  2. Select the desired group as the primary group

:information_source: Setting a user’s primary group has additional implications. For more information, read this topic.

4. Assign the group’s default title to the user

You can set the user’s title from either the admin page or the user’s preferences.

From the user’s admin page:

  1. Locate the “Title” field
  2. Select the group’s default title

From the user’s preferences:

  1. Go to the user’s profile
  2. Click on the “Preferences” tab
  3. Navigate to the “Account” section
  4. Find the “Title” field and select the group’s default title

Verifying the setup

After completing these steps, the user’s title should now be clickable and link to the group’s page.

Clickable user title linking to group page

Additional notes

  • This process doesn’t work with automatic or system groups like the “staff” group.
  • Some sites create separate groups (e.g., a “team” group) to enable this functionality for staff members.

Last edited by @hugh 2024-07-15T07:11:42Z

Last checked by @hugh 2024-07-15T07:11:49Z

Check documentPerform check on document:
10 个赞

Thanks for the guide :smile:

2 个赞

似乎你无法将 staff 组(或其他自动/系统组)设为用户的首选组,或为其关联(可点击的)标题。

现在我明白了为什么 meta 有一个 team:wink:

有人成功了吗?

在移动设备上:
在其他 Discourse 论坛上可以,但在 Meta 上不可以 :eyes:

1 个赞

看起来这自 2014 年以来发生了变化?我能够创建该组(“贡献者”),并且还为该组添加了默认标题。

但是,当我将用户添加到该组并编辑用户的个人资料时,我没有为用户分配“组默认标题”的选项。

此致,
Dan