Ability to custom define topic "preview text"

Is it possible to change the preview snippet displayed for a topic?

I would like to be able to specify what is written here.

The only way to do that is to make sure the first text in the topic is what you want to be the preview.

1 Like

Thanks Jeff.

Is it possible to specify a cutoff, such that in my example only the first sentence shows in the preview?

But isn’t that the only place you see that text? It’s from the category description when you edit the category. So if you edit it down to what you want will that not work?

Not quite, I’m asking in regard to the preview shown for topics, not categories.

It sounds a lot like you’re looking for excerpts in the way that CMS such as WordPress offers.

What’s your use case?

Oh gotcha. I hadn’t realised you COULD get a preview for topics. I might see if our users want that. Thanks and sorry for butting in!

I’m trying out hosting our documentation articles in one section of the forum so that it’s all in one place instead of having users bounce between the separate Docs and Forum sites. In this case I would like to be able to exercise a little more control to be able to clearly tell people what to do in that preview.

Technically @sam built a version of this as an experiment a while back (where you could explicitly mark begin and end excerpts in the first post) but I am not sure it survived into current versions of Discourse.

1 Like

No problem. I consider a product a success when the support questions revolve around small details and nitpicks instead of “it’s on fire!” or “why is it not working!?!?!?” - and I love Discourse.

Thanks Jeff.


Yeah we have 2 versions that work, a div with the class excerpt or a span with the class excerpt

<div class="excerpt">
<span class="excerpt">

We use it in discourse code review, cause it makes oneboxes look way prettier


That certainly did the job.




Thank you Sam!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.