Published topic with a link to itself in the forum?

Hi guys.
I was thinking, expecting there would be an option for user to choose or perhaps even a default behaviour, where a link is attached/included in a published page, link to the topic(from which page originates) in forum.
Making such a link manually in the post itself, only to have it in published page, does not make sense I think for such thing will loop onto itself, right?
How do you do it guys?

If you mean Discourse page publishing, I’m not sure how that would work, since pages can be published from secure/private categories and also linked from any number of places on the forum.

1 Like

@Lilly so how do you/people point within a published page, (back) to the topic from which published pages originates, so other can comment/reply in topic’s forum?

Not sure what you mean - you can edit the published document and add a link to a specific topic if you want it linked from one.

Topic discussion for published page:


Published page:

Yes but, as per my first message/question - Making such a link manually in the post itself, only to have it in published page, does not make sense I think for such thing will loop onto itself, right?

In other words, that link is on original post, in forum, pointing to itself? (doubling a post, which crossed my mind, so a published page with a link + the same post in forum, without, makes no sense)

Well you could always make a theme component or plugin to get what you want then? or hire someone in marketplace :woman_shrugging:t2:

Sure I could… do a dozen things… but, what would you/@devel think about my first thought I shared - “expected”
I was expecting it for it makes only sense to have it as an option/default behaviour - since “publishing” is a core 'feature".

If @devel read here then I suggest - to make already cool software even better (never ending story) - to enhance “publishing” mechanisms with such option where: either with opt-in or default behaviour by which, published pages have a “pointer” to themselves in the forum.

A published page “has” two links.

A /pub/ that links to the standalone page:


A /t/ that links to the topic:

Now, there’s a loop in the topic, as you said.

A way to prevent this would be using this:

For instance, write this in your topic/published page:

[wrap=topic-link]Link to topic:[/wrap]

Content 🧑‍💻

In your CSS, write:

article [data-wrap="topic-link"] {
  display: none;

Now, here’s what the published page and topics look like:

The only issue is that there’s a margin-top on the first visible content in the topic because of this Discourse’s default rule:

.cooked>*:first-child, .d-editor-preview>*:first-child {
    margin-top: 0;

The first element, while hidden, still is the first element detected in the CSS. This can be circumvented, of course, but it will depend on how you organize your content. The problem won’t occur if your topic’s link isn’t the first content in the post, for example.

1 Like

In my screenshots, those are two different topics, not one published one linked to itself. see the titles and links. I don’t believe I understand what you are looking for here.

If I’m reading things correctly, I think they’re wanting published pages to work in a way similar to the way the Docs plug-in does where the docs version of the page shows a link to the actual thread at the end of the content so you can comment on it.


Oh could be, like the “View discussion on this topic” link in docs. Kinda like my screenshots above then, but only automatic. Doesn’t really make sense for page publishing, given how it works, you can link to a published page from countless places on the forum. I have links in my forum’s navigation sidebar menu that go to published pages. Perhaps some options for attaching published pages to topics for discussion could be a feature request? Almost sounds like they want some kind of embedded commenting.

Perhaps OP should check out the docs plugin.

@Canapin gets it.
It is rather simple, I tried my best I doubt I can do any better, I’ll try:

  1. topic is created, which topic got published
  2. the page created off the topic users want, I do, to point - within/on the page - to link back to original topic in the forum.

Right now, as I understand — unless worked around as @Canapin suggests — an URI would need to go into the topic itself so the published page would - as a copy of the topic - point to the topic… which way the topic has an URI pointing, linking onto itself…

@devel - something to enhance “publish” feature, as I explained earlier, to alleviate this “hurdle” would be great to have in future releases - an opt in/on option “link to topic” or some such.

1 Like

I agree with this feature request - and have had to cobble together bespoke workarounds as per @Canapin.

It would be a definite improvement to have at least the options of a recursive link back to the origin.

Another enhancement which would be nice is the option to have the published page automatically redirect a signed in user to the originating topic (if it is viewable by them)

The main use-case I have is for exposed content from a private forum, which I want prospective users to be able to engage with further easily - typically events.

1 Like

aha Your use-case scenario makes me understand the request and the reasoning more clearly now. :slight_smile: thank you @nathank.

1 Like

Hmm… I believe your wanting say something like say a page published Site rules with a Topic people can goto to discuss the published page?

If as @Lilly suggested it is published from the Staff Category which is private. Creating a new topic with a link to published page can work.

Or if the Published page was made from a public topic you could add a link using insert Link Discuss Here

Similarly a link to a public topic can work as well.