Topic URL to include its Category


(Steven Slade) #1

I am investigating the possibility of including the category in the topic URL for retargeting purposes.

For example: https://meta.discourse.org/t/support/where-can-i-create-tags/31094 or https://meta.discourse.org/support/t/where-can-i-create-tags/31094

From previous responses on this subject, it seems as though this will wreck havoc on the routing system, correct?

What about the possibility of including the category in query string? https://meta.discourse.org/t/where-can-i-create-tags/31094/?category=support

Thoughts, suggestions, answers?


(Tobias Eigen) #2

I think if you put it before the topic ID at the end there’s no problem… but you can’t add more slashes or other delimiters.

Maybe you can use underscore to delimit if you need it, e.g. these two links go to the same place without any problem:

https://meta.discourse.org/t/topic-url-to-include-its-category/39996

https://meta.discourse.org/t/_support_topic-url-to-include-its-category/39996

your URL with question mark at the end might work - seems to work here. Not sure what the effect of that is.

https://meta.discourse.org/t/where-can-i-create-tags/31094/?category=support