# 能够重新排序侧边栏中的类别

**URL:** <https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730>\
**Category:** UX\
**Tags:** sidebar\
**Created:** [2022年十月12日 16:18 UTC](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730 "2022-10-12T16:18:51Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)\
**Post date:** [2022年十月13日 17:57 UTC](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730/21 "2022-10-13T17:57:52Z")

</div>

好的，我正在采纳你的建议 @tobiaseigen：

> [@tobiaseigen](#):
>
> it makes sense to have it just follow the `fixed_category_positions` setting

我们会看看是否能尽快将它列入我们的尝试列表。

---

<div class="post-metadata">

**Author:** ![Karl\_Reza](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/karl_reza/32/246028_2.png) [@Karl\_Reza](https://meta.discourse.org/u/Karl_Reza)\
**Post date:** [2022年十月15日 09:30 UTC](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730/23 "2022-10-15T09:30:31Z")

</div>

我也赞同！如果能做到以下几点就太棒了：

- 默认情况下，新用户将按照 `fixed_category_positions` 的顺序获取类别。
- 感兴趣的用户可以点击编辑（✏ 图标）并根据自己的需求重新排序。

最终，这将使新成员更容易导航，并且合乎情理。

---

<div class="post-metadata">

**Author:** ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)\
**Post date:** [2022年十一月4日 01:05 UTC](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730/24 "2022-11-04T01:05:24Z")

</div>

侧边栏中的类别顺序现在遵循 `fixed_category_positions` 站点设置，由 @tgxworld 通过此 PR 实现：

> <https://github.com/discourse/discourse/pull/18803>
>
> There are two possible ordering for categories shown in sidebar with
> this commi…t.
> 
> When the \`fixed\_category\_positions\` site setting is enabled, the
> categories are ordered based on \`Category#position\` which is a configurable
> option by the user. When said site setting is disabled, the categories
> are ordered based on \`Category#name\`.
> 
> The categories in Sidebar are also sorted in such a way where child
> categories are always ordered right after their parents. When multiple
> child categories are present, the child categories are ordered based on
> the ordering described above.

---

<div class="post-metadata">

**Author:** ![jimkleiber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimkleiber/32/121814_2.png) [@jimkleiber](https://meta.discourse.org/u/jimkleiber)\
**Post date:** [2022年十一月4日 07:05 UTC](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730/25 "2022-11-04T07:05:44Z")

</div>

我认为我对这次更改感到感激的原因是，虽然侧边栏的设计是为了让用户能够根据自己的喜好进行自定义，但我认为 1) 大多数用户可能甚至不知道这是可能的，而且 2) 大多数用户可能无论如何都会坚持使用默认设置。

我多年来一直使用 Discourse，并且拥有编码和网站背景，我可能会在用户界面和自定义方面遇到困难，所以我喜欢能够为用户设置侧边栏类别的默认顺序，假设他们可能永远不会真正更改它们。

---

<div class="post-metadata">

**Author:** ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)\
**Post date:** [2022年十一月5日 20:14 UTC](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730/26 "2022-11-05T20:14:05Z")

</div>

> [@mcwumbly](#):
>
> 侧边栏中的类别顺序现在会遵循 `fixed_category_positions` 站点设置

我希望我能为这个更改提供不止一个 ❤。非常感谢 @tgxworld 的实现！

我越用侧边栏，就越喜欢它，而这是唯一一件让它在我最大的论坛上无法正常工作的事情。这太棒了！

[上一頁](https://meta.discourse.org/t/ability-to-reorder-categories-in-the-sidebar/241730.md?page=1)
