# Sort topics (within category) in alphabetical order by default

**URL:** https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350
**Category:** Support
**Created:** [18 בפברואר,‏ 2015,‏ 9:38am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350 "2015-02-18T09:38:39Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![DigNeurosurgeon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/digneurosurgeon/32/115658_2.png) [@DigNeurosurgeon](https://meta.discourse.org/u/DigNeurosurgeon)
#### Post date: [18 בפברואר,‏ 2015,‏ 9:38am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/1 "2015-02-18T09:38:39Z")

</div>

I know that the issue has been [discussed before](https://meta.discourse.org/t/what-is-the-sort-order-for-topics/6856) 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](http://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](http://neuromind.cc), and modified @sam’s [Minimal Topic List Design](https://meta.discourse.org/t/sams-personal-minimal-topic-list-design/23552) 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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [18 בפברואר,‏ 2015,‏ 6:14pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/2 "2015-02-18T18:14:26Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DigNeurosurgeon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/digneurosurgeon/32/115658_2.png) [@DigNeurosurgeon](https://meta.discourse.org/u/DigNeurosurgeon)
#### Post date: [18 בפברואר,‏ 2015,‏ 8:45pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/3 "2015-02-18T20:45:04Z")

</div>

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. 😉

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [18 בפברואר,‏ 2015,‏ 9:23pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/4 "2015-02-18T21:23:28Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![DigNeurosurgeon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/digneurosurgeon/32/115658_2.png) [@DigNeurosurgeon](https://meta.discourse.org/u/DigNeurosurgeon)
#### Post date: [26 בפברואר,‏ 2015,‏ 8:02pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/5 "2015-02-26T20:02:48Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dosch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dosch/32/51426_2.png) [@dosch](https://meta.discourse.org/u/dosch)
#### Post date: [22 בפברואר,‏ 2017,‏ 7:45am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/6 "2017-02-22T07:45:18Z")

</div>

> [@Mittineague](#):
>
> It would probably be easy enough to sort by title except for one problem - endless scroll.

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?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [22 בפברואר,‏ 2017,‏ 4:23pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/7 "2017-02-22T16:23:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)
#### Post date: [14 בנובמבר,‏ 2018,‏ 8:38pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/8 "2018-11-14T20:38:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dau](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dau/32/71253_2.png) [@dau](https://meta.discourse.org/u/dau)
#### Post date: [17 במרץ,‏ 2019,‏ 1:13pm UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/9 "2019-03-17T13:13:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![nordize](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nordize](https://meta.discourse.org/u/nordize)
#### Post date: [10 ביולי,‏ 2019,‏ 12:28am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/10 "2019-07-10T00:28:02Z")

</div>

Can we **please** have this already? There have been a lot of requests with various usages explained that affect people. I understand the whole philosophy of encouraging good practices, but this has had at least 4 topics I’m aware of and plenty of replies requesting it … arguing that we’re doing it wrong is kind of telling us we’re all stupid at this point 🙂

At least please allow it with query strings in the url (`?sort=title`) so you don’t waste time on GUI extras, but please don’t oppose it to the point of almost preventing it.

I don’t need it by default. I just want to be able to do it.

In my case, we add integers to post titles as a “rank”, which we change over time as we review the topic’s importance and add new topics. Integers are not necessarily consecutive and their value matters too. It’s a private forum where each topic is a piece of (important) info, from which we need to pick the best N as a last step. The rank reviewing process requires seeing all of them in in one page, and also seeing the integer, then resort, review again, and so on, as we keep working and adding topics with various ranks in-between existing ranks.

We can’t use tags or other ugly categorization, because that would remove a subset of titles from view. Search doesn’t help either.

Currently we copy paste the titles into excel and do the whole thing there, then come back and re-edit, etc … **which is stupid**. Discourse should have sorting by title. It’s pretty basic.

p.p.s. So far I know of

- [Feature request: Sort display of topics Alphabetically](https://meta.discourse.org/t/feature-request-sort-display-of-topics-alphabetically/53911)
- [Sort topics (within category) in alphabetical order by default](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350)
- [Sort topics within category by topic title](https://meta.discourse.org/t/sort-topics-within-category-by-topic-title/56139)
- [Call me stupid - how do I sort topics by created date or by title?](https://meta.discourse.org/t/call-me-stupid-how-do-i-sort-topics-by-created-date-or-by-title/83684)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [10 ביולי,‏ 2019,‏ 2:30am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/11 "2019-07-10T02:30:05Z")

</div>

So we needed _another_ topic about this? If you feel so strongly about it, offer a bounty in #Marketplace, or sign up for an enterprise hosting plan at [discourse.org](http://discourse.org)

---

<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: [30 בדצמבר,‏ 2022,‏ 1:34am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/12 "2022-12-30T01:34:17Z")

</div>



---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [30 בדצמבר,‏ 2022,‏ 10:36am UTC](https://meta.discourse.org/t/sort-topics-within-category-in-alphabetical-order-by-default/25350/13 "2022-12-30T10:36:22Z")

</div>


