URL to filter by category and create a new topic

Hello!

There is a way to open Discourse and filter by category, by adding “/c/categoryName” to the URL.

There is also a way to have Discourse display the UI to create a new topic of a particular category, by adding “/new-topic?category=categoryName” to the URL.

I wonder, is there a way to combine the above two scenarios, i.e. to construct a URL that would display the topics filtered by a particular category and at the same time offer the user to create a topic of the same category?

Thank you in advance!
Nikolai

Hello! Do you have any suggestions? Or is this really impossible?

AFAIK there is no built in way, @techAPJ can confirm.

I support making a change so IF ?category=categoryName you land on the category specific page vs latest and have category picked automatically.

4 Likes

I am not sure if I understand the question correctly.

I think this we already do this. For example: https://meta.discourse.org/c/bug

Now when you try to create a new topic by clicking on button + New Topic on “bug” categories page the category “bug” will be pre-selected in composer.

If you want users to have a link to create topics on “bug” category as soon as they land on your forum just hand them this URL: https://meta.discourse.org/new-topic?category=bug.

3 Likes

Hello Arpit, thank you for the answer! The two links you sent work as expected, but I would like to combine them.

  • https://meta.discourse.org/c/bug shows the list of all the topics of the category “bug”
  • https://meta.discourse.org/new-topic?category=bug creates a new topic of the category “bug”

But can I have a URL to create a new topic of the category “bug” and at the same time have the list behind already filtered by the category “bug”? With the second link the list includes all categories.

Thanks again!
Nikolai

4 Likes

Added on my list to make it so. :memo:

3 Likes

Done via:

https://github.com/discourse/discourse/commit/7d9c97d66141d35d00258fe544211d9fd7f79a76

3 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.