The discussion revolves around combining two URL functionalities in Discourse: filtering topics by category and creating a new topic in that category. nikolais asks if a single URL can both filter topics by a specific category and pre-select that category when creating a new topic. sam supports this idea, suggesting that if a category is specified in the URL, the user should land on the category-specific page with the category automatically selected. techAPJ initially explains that the current behavior already achieves this, but clarifies that the user wants the list of topics to be filtered by the category when creating a new topic. techAPJ acknowledges the request and confirms it has been added to their to-do list, later confirming the implementation via a GitHub commit 7d9c97d66141d35d00258fe544211d9fd7f79a76.
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?
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.
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.