Discussion view

Discussion view

Shows one discussion topic with all replies and a reply field for logged-in visitors.

Shows one discussion topic with all replies below each other, and a reply field for logged-in visitors. On a locked topic the reply field disappears by itself. No forum is active on this demo site; on a site with forums this works right away. The technical name is TopicView.

Use TopicView to render a single forum discussion as its own page — one topic with every reply beneath it in order, plus a reply box for anyone logged in. It's the detail-page counterpart to a forum's topic list: visitors land here from a link in the overview and read the full thread without pagination.

Locking a topic (to close discussion on an old thread, for example) automatically hides the reply field, so no extra template logic is needed to handle that state. Pair it with ForumIndex for the topic list and see forums for setting up the underlying data.

Typical use cases

A software product's support forum is the clearest fit: a TopicView page per question thread, with the original problem at the top and every reply — including staff answers — visible in one continuous read. A professional-services firm running a client community or alumni network uses the same block for member discussions, where being logged in to reply, rather than open to anonymous posting, is usually the desired behaviour rather than a limitation. A webshop can use it in a narrower way too, for product-specific Q&A threads where past buyers answer questions from prospective ones directly on the product page's linked discussion.

Common mistakes

Because every reply in a topic renders on the same page with no pagination of its own, a thread that grows into the hundreds of replies becomes a genuinely long page to load and scroll through — lock ageing threads once they've run their course, or split an evolving topic into a fresh one, rather than letting a single thread grow indefinitely. Skipping a visible link back to the ForumIndex overview is another common gap: a visitor who arrives at a topic from a search engine or shared link has no way back to the rest of the discussion without it.

Since the reply field only appears for logged-in visitors, give anonymous readers a clear next step — a sign-in link near the hidden reply field — rather than leaving them at a dead end where the ability to participate simply isn't explained.

Consider notifying participants by email when a new reply arrives, so a discussion stays active without every participant needing to revisit the page repeatedly just to check for updates.

Example

topicview.jsx
<TopicView forum-slug='general' topic-slug='welcome' />

The prompt for this example

prompt
Create a page that shows the topic 'Welcome' from the forum 'General' with all replies.