Custom permalinks

There is a permalink tab under customize section in admin panel. I don’t know what does it exactly do. Can someone please explain it to me with a picture from that area? Because I have my discourse in Persian, and Persian translation of different fields in this section doesn’t make sense to me.

See:

and

6 Likes

thanks.
How can I programmatically create these permalinks? php code is preferred for me. is it possible?

I want to use discourse as a q&a platform in my educational app. My app has a structure like this:
course/chapter/lesson
So I want the users to be able to create new topics like this:
course/chapter/lesson/topic-1
course/chapter/lesson/topic-2
etc…
since this structure isn’t supported by discourse, I want to use this customized permalinks as a redirection tool to created topics. Is it a good idea?

You can use the API to create these. Create a permalink while the Network tab of your browser’s development tools is open to see how it works. You can find more details here:

4 Likes

There’s a post in the linked topic with an example:

https://meta.discourse.org/t/redirecting-old-forum-urls-to-new-discourse-urls/20930/16?u=neil

Permalink.create(url: '/discussion/12345', topic_id: 987)
7 Likes

#faq-material for this should be developed as part of Feature interest survey: "go" permalinks

2 Likes