Have url for creating topic with specific title


(Rene Groeschke) #1

Hey guys,

When we release a new version of our software we need to post an announcement to our forum like I did now manually at Gradle 2.4 released - News - Gradle Forums

Before moving to discourse we used getsatisfaction. GS allowed us to prefil the title of a topic we create by offering a URL like this:

http://my-forum.org/gradle/topics/new?topic[subject]=Gradle+2.4+released&topic[style]=update
This allowed us an easy convenient way to create that announcement by just clicking the link from my mailbox and it guaranteed that there was no typo in the title so we could already process the url to that post. Is something similar possible with discourse?

One other question: is it safe to just link to Gradle 2.4 released - News - Gradle Forums instead of Gradle 2.4 released - News - Gradle Forums or can there be any trouble with this not always being support (given that the topic title is only used once)?


(Sam Saffron) #2

Yeah @techAPJ recently added this

Ideally you should link with ids, if the slug changes when people change titles, links can break


(Rene Groeschke) #3

that’s exactly what we’re looking for. But it seems the category option does not work for us. Should it be category name or category id. And if it is Id, which is the id of my desired category? I needed to test all kind of numbers till I figured out 17 is category_id I want


(Jeff Atwood) #4

It should work with just the category name as long as the category name is unique, e.g. if you have five categories and each of those has a subcategory of “bugs”, enter it as “product/bugs”.

@techapj can you change it so it works this way? Supporting numeric IDs is fine, but the cat/sub strings should work as well…


(Arpit Jalan) #5

Agreed, made it so that URL supports category/subcategory name like category=product/bugs

https://github.com/discourse/discourse/pull/3434


(Rene Groeschke) #6

thanks for the quick fix. but I stay with the id for now :wink:


(Jeff Atwood) #7

Is this complete and can be closed, then?


(Rene Groeschke) #8

from my side it is solved


(Jeff Atwood) #9