# 在 \`/about\` 页面添加更多的小组

**URL:** https://meta.discourse.org/t/adding-more-groups-to-the-about-page/334268
**Category:** Development
**Tags:** about-page
**Created:** [2024年十一月3日 14:23 UTC](https://meta.discourse.org/t/adding-more-groups-to-the-about-page/334268 "2024-11-03T14:23:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [2024年十一月3日 14:23 UTC](https://meta.discourse.org/t/adding-more-groups-to-the-about-page/334268/1 "2024-11-03T14:23:00Z")

</div>

大家好。

这可能有点渺茫，因为我不确定由于年代久远，它是否还支持 😊

在过去的几年里，我们一直使用 @awesomerobot 的 [这个](https://meta.discourse.org/t/add-more-groups-to-about-us-page/110381/4) 主题在我们的 `/about` 页面上显示我们的 TL4 团队成员：

```plaintext

<!-- Display TL4 users on /about page - REF: https://meta.discourse.org/t/add-more-groups-to-about-us-page/110381/4 -->
<script type="text/discourse-plugin" version="0.8">
const ajax = require('discourse/lib/ajax').ajax;
  api.registerConnectorClass('about-after-moderators', 'custom-group', {
    setupComponent(args, component) {
        var groups = ["trust_level_4"]; // Add group names here, eg: var groups = ["trust_level_4", "interns"];
                groups.forEach(function(group) {
            ajax("/groups/" + group + "/members.json").then (function(result){
              var groupMembers = [];
              result.members.forEach(function(members){
                groupMembers.push(members);
              });
              component.set(group, groupMembers);
            });
        });
    }
    });
</script>
<script type="text/x-handlebars" data-template-name="/connectors/about-after-moderators/custom-group">
    <section class='about custom'>
       <h3>我们的信任等级 4 团队</h3> <!-- Change icon and title -->
       <div class='users'>
         {{#each trust_level_4 as |u|}} <!-- change the group name in here -->
           {{user-info user=u}}
         {{/each}}
        </div>
    </section>
</script>

```

唉，自从几天前更新到 [新的 /about 页面](https://meta.discourse.org/t/new-and-improved-about-page-at-about-is-live/324212) 以来，它有点坏了。

未登录时，它仍然显示标题但没有用户列表：

 ![Screenshot 2024-11-03 at 14.14.01](https://global.discourse-cdn.com/meta/original/4X/2/6/b/26bcfca75db1743c053ce43d990371e51c99425d.jpeg)

它还在标题左侧显示了一个图标，如您所见，该图标不在上面的代码中。登录时也不存在该图标。

这个主题代码能否更新为在未登录时根本不显示任何内容，或者将 TL4 用户列出在那里？

第二个问题是它没有遵守我们添加到特殊组中的任何用户，我们在站点设置 `about page hidden groups` 中使用该组。该组中的用户已正确隐藏在 উপরের 部分的管理员列表中，但这些用户在下部 TL4 列表中仍然可见。

第三个问题是布局不正确。它将所有 TL4 名称列为一个直线列表，而不是根据屏幕大小进行换行：

 ![Screenshot 2024-11-03 at 14.16.43](https://global.discourse-cdn.com/meta/original/4X/c/3/a/c3a284dbebd025f387f9a518be4eb745b4fc7fb1.jpeg)

同样，由于我们曾经使用的代码年代久远以及 `/about` 页面的新更新，我不确定这些是否可能。

欢迎任何建议或意见 🙂

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2024年十一月4日 21:25 UTC](https://meta.discourse.org/t/adding-more-groups-to-the-about-page/334268/2 "2024-11-04T21:25:20Z")

</div>

为了以更少复制粘贴的方式支持这一点，我构建了一个主题组件，可以为新的 /about 页面添加额外的组：

> [@Add groups to the /about page](https://meta.discourse.org/t/add-groups-to-the-about-page/334492):
>
> information_sourceSummary Add more groups to your Discourse /about pageeyeglassesPreview [Theme Creator](https://discourse.theme-creator.io/theme/awesomerobot/about-page-groups)hammer_and_wrenchRepository [https://github.com/discourse/discourse-add-groups-to-about-component/](https://github.com/discourse/discourse-add-groups-to-about-component/)questionInstall Guide [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component This component allows you to easily add more groups to the new /about page, more details…

> [@Richie](#):
>
> 第二个问题是它没有遵守添加到我们特殊组中的任何用户，我们在站点设置 `about page hidden groups` 中使用该特殊组。

不幸的是，目前这两种方法仍然如此……我认为我们在前端无法访问该设置，因此这需要对 Discourse 进行更多更改才能支持。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2024年十二月4日 21:25 UTC](https://meta.discourse.org/t/adding-more-groups-to-the-about-page/334268/3 "2024-12-04T21:25:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
