How do I create a link which opens Create Topic?

(Andy White) #1

We would like to create a link from some text in the Category Description. which opens Create Topic dialogue page (Just as the Create new Topic text link does.)

Here is the page on our site where the question is posed

Many thanks for your help on this. I have searched and I get the feeling it is a wish list, but maybe wrong

(Simon Cossar) #2

You can do it. See this topic: Compose a new pre-filled topic via URL.

(Andy White) #3

Gave it my best non coder attempt. My effort and log here. Can you give me some advice on what I should have put in?

(Steve Combs) #4

The link looks ok   


What happens when you try to create the topic? It may show Latest screen, but the topic will be added to the applicable category

(Andy White) #5

Thanks Steve

I get this

When I should be getting this (I Thought)

(Vinoth Kannan) #6

Replace & with & like below then it will work.,planned

(Steve Combs) #7

Thanks. The examples that are oneboxed at Compose a new pre-filled topic via URL have the &. Updating those may help others.

(Vinoth Kannan) #8

It looks like some other issue is causing it. I created a bug topic for that. Thanks for your concern @scombs.

(Simon Cossar) #9

You seem to be on the right track. When I substitute my site’s domain into the template you have in that topic, it opens the composer in the correct category.

(Simon Cossar) #10

The problem is that Discourse want to automatically onebox the message link. You can stop a onebox from being created by either putting a space in front of the link, or by creating the link by clicking on composer’s link (:link:) modal.

(Jeff Atwood) #11

You can also stop a one of by putting any text after the link. The link must be on a line by itself with nothing else in front or behind it, to one box.