Sort topics (within category) in alphabetical order by default

I know that the issue has been discussed before and some progress has been made (and that many disagree that alphabetic sorting on topic title is useful), but to me it is. I am experimenting with Discourse to see if I can use it to replace NeuroDSS.com which contains neurosurgical classification and grading systems. The option that users can add their own classifications (and more) and discuss them on site is a great side benefit. Primarily however, I want users to go to categories easily and find the content they are looking for.

I managed to get the categories view first when accessing NeuroMind.cc, and modified @sam’s Minimal Topic List Design to allow the user to sort topics in alphabetical order by changing this piece in the header :

<script type='text/x-handlebars' data-template-name='topic-list-header.raw'>
    {{raw "topic-list-header-column" sortable='true' order='topic.title' name='topic.title'}}

This works, but the user still has to perform the sorting manually. How can this be done as a default setting when the category is opened?

Side note: I also changed

{{raw "topic-list-header-column" sortable='true' number='true' order='replies' forceName='Replies'}}

(in the original post it said order='posts' and it gave some side effects, guess that is a typo)

Any help would be greatly appreciated!

Pieter

I think if you “need” to sort by title there is something wrong with your approach. As in, you should be using categories or tags for that information rather than embedding it in the title as a string.

That depends, I guess… If someone wants to “browse” through a certain category it may be helpful if the content is sorted. Otherwise a topic may be at a different position everytime.

I realize this is not the main purpose of Discourse, but to me the lack of it is currently holding me back of proceeding. Fortunately you also offer categories as JSON in which I can do sorting to create some mobile version myself, but I prefer not to. :wink:

It would probably be easy enough to sort by title except for one problem - endless scroll.

So do an alpha sort in batches of 30?

Wouldn’t it be better to use Search?

Depends… for very large categories, yes. But if a specific category is restricted regarding adding new content, no.

We have a category explaining terms; a dictionary. Here alphabetic sorting would be handy to quickly scroll to the right term.
Why is endless scrolling a problem…? Couldn’t you just start with ‘A’ and load ‘B’ as the user scrolls down?

Or is the problem that the list can’t be made because to the browser not all topics are known yet, before the user scroll down?

I think using Tags would be the far easier way to present alphabetically grouped lists, else The Search feature.

It looks like this idea isn’t going to happen but just to share my use case - we have voting enabled for topics & want to enable users to vote for the stocks that they’d like us to add to our service so that they can invest in them (we’re a stockbroker).

The names of each topic within the dedicated category is the name of the stock.

Unless I’m missing something, it seems like the most useful way to order the list, within the category view, would be in alphabetical order, to make finding stocks that others have already requested easier.

I don’t think Tags would be right for this, as we’d only use each Tag once - one Tag for each of the stocks. And as we all know, a large proportion of users don’t use search.

My use case: One of the categories in my Discourse is a User Guide for a website. In the User Guide category I have Topics like “About”, “Getting Started”, “Searching”, etc. These Topics should be ordered in a specific way, rather than by last update or some other metric. If I could sort the Topics alphabetically, I could rename them to “1. About”, “2. Getting Started”, etc.

我们真的能尽快实现这个功能吗?已经有很多用户提出了各种使用场景的请求,这些需求切实影响着大家。我理解鼓励良好实践的整体理念,但目前至少已有 4 个相关主题(我知道的),还有大量回复在请求此功能……如果一味争辩说我们“做错了”,那无异于在暗示我们都很愚蠢:slight_smile:

至少请允许通过 URL 查询字符串(如 ?sort=title)来实现排序,这样大家就不用浪费时间在图形界面额外的操作上。但请不要强烈反对,以至于几乎阻止了这一功能的实现。

我不需要默认开启它,我只希望能有这个选项。

以我的情况为例,我们在帖子标题中添加整数作为“排名”,并随着时间推移,在评估主题重要性及新增主题时不断调整这些排名。这些整数未必是连续的,其数值本身也很重要。这是一个私有论坛,每个主题都是一条(重要的)信息,我们需要在最后一步从中挑选出最佳的 N 条。排名评估流程要求我们在同一页面上查看所有主题,并看到对应的整数,然后重新排序、再次评估,如此反复,因为我们会持续工作,并在现有排名之间插入带有不同排名的新主题。

我们无法使用标签或其他笨拙的分类方式,因为那样会从视图中移除部分标题。搜索功能也无济于事。

目前,我们不得不将标题复制粘贴到 Excel 中,在那里完成全部操作,然后再返回论坛重新编辑……这实在太愚蠢了。Discourse 理应支持按标题排序,这非常基础。

附注:据我所知,已有以下相关讨论:

所以我们需要再开一个关于这个话题的帖子吗?如果你对此如此在意,可以在 Marketplace 中提供悬赏,或者在 discourse.org 注册企业托管计划。