# Sort by Solved/Unsolved Questions in Category

**URL:** <https://meta.discourse.org/t/sort-by-solved-unsolved-questions-in-category/65153>\
**Category:** Feature\
**Tags:** solved\
**Created:** [2017年六月27日 00:27 UTC](https://meta.discourse.org/t/sort-by-solved-unsolved-questions-in-category/65153 "2017-06-27T00:27:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)\
**Post date:** [2017年六月27日 09:04 UTC](https://meta.discourse.org/t/sort-by-solved-unsolved-questions-in-category/65153/2 "2017-06-27T09:04:35Z")

</div>

You can do something like that under Theme \> Common (or Desktop, or Mobile, it’s your choise) \> Body

```plaintext
<script>
  Discourse.ExternalNavItem = Discourse.NavItem.extend({
    href : function() {
      return this.get('href');
    }.property('href')
  });

  I18n.translations.en.js.filters.solved = { title: "Solved", help: "topics with solution" };
  I18n.translations.en.js.filters.unsolved = { title: "Unsolved", help: "topics without solution" };
  
  Discourse.NavItem.reopenClass({
    buildList : function(category, args) {
      var list = this._super(category, args);

      if(!category) {
        list.push(Discourse.ExternalNavItem.create({href: 'http://your-domain-url/?solved=yes', name: 'solved'}));
        list.push(Discourse.ExternalNavItem.create({href: 'http://your-domain-url/?solved=no', name: 'unsolved'}));
        
        
      }
      return list;
    }
  });
</script>

```

In this way you add the buttons Solved and Unsolved on your menu.  
You need only to change the URLs with your domain (and customize with a particular category if you want, eg [http://your-domain-url/c/support?solved=yes](http://your-domain-url/c/support?solved=yes))

---

_[View the full topic](https://meta.discourse.org/t/sort-by-solved-unsolved-questions-in-category/65153)._
