Topic List Previews Theme Component

It’s not a theme component. If it was it would be integrated. It’s a plugin whose purpose is to modify/extend/improve the core API which cannot be achieved with a mere theme component.

1 Like

Appreciate all the responses! Thanks for such a cool plugin, Robert :slight_smile:


No problem. It’s worth pointing out that it you have sufficiently large sidebars the number of columns will automatically reduce and you can set it up to have just one column which may alleviate your variable height concern.

You could try it with our Layouts plugin or the core sidebar and sidebar blocks theme component.

For some reason this theme component removes excerpts completely for me when I’m on mobile (Diacourse app, iOS):

I feel I’ve looked at every setting and cannot seem to figure out why this is happening.

Make sure you’ve populated the mobile variants in this setting, like so:

(in this case you will need to ensure you have latest-mobile)

On my website thumbnails appear on the top instead of appearing on the left side like on

Could it be caused by the topic voting theme component?
Is there a way to fix this?

Does removing that solve the issue?

It seems like it does: without the topic voting:

Can I do something to make it work together with the thumbnail on the left of the vote count?

I’m afraid I cannot guarantee that. Check out Topic List Thumbnails as an alternative.

I seem to be having trouble with topic list portfolio filter parameter respecting a subcategory. Is this a possible bug?

I have a category with the slug blog and a subcategory with the slug blog posts. I’ve tried both blog-posts and blog-blog-posts as values, but the filter does not work.

A couple other nice-to-haves:

  • ability to change the text “portfolio” everywhere, including the URL
  • ability to change the icon used for the button
  • Have the button respect the button css on the site (see attached image)

That’s not how this works, it’s by tag, so you need to tag every Topic you want included. This gives the user some discretion over what is included. Erk, haven’t used it that way in a while, will double check.

It’s not a button, it’s a link dressed up like a button - but you could of course target it with your own CSS.

That is possible, though if you create a small theme component you can substitute the icon yourself using the Discourse Javascript api, it’s pretty straightforward.

That’s not going to be possible, this is a Theme Component.

1 Like

It says right in the theme component, “Enter the tag or category slug (depending of value of filter type setting)”. Category slugs work, just not subcategories. Of course, depending on if you have topic list portfolio filter type set to category, which we do.

Sorry, I meant just within the context of this theme component (e.g. the route, title of the profile summary tab, etc.)


:sweat_smile: My memory! I haven’t used this for a while. I’ll take a look :slight_smile: Thanks!

The url change would need a plugin. I’ll check other things are consistent.

1 Like

I did get it to work fine, of course, by just exporting this theme component and changing the route myself. I am not familiar, yet, with theme/component development and am not aware if they’d give you an option for having a variable for the route.

I’m fine to modify all of these things, but of course it’s always a good place to start by requesting features that others may used too :smiley:

1 Like

I’m really not clear what you mean. You can’t add or modify routes in theme components. Only plugins have access to change the API. So I’m a bit unclear what you mean by “change the URL”?

1 Like

With the theme component off, the route https://{{myurl}}/discuss/u/{{user}}/activity/portfolio does not exist.

With the theme component on, it does exist. Maybe “route” is not the correct terminology to use in this context.

I was able to export the theme component, modify this route (or whatever the proper term may be) to blog, and it worked great.


My apologies, now I understand what you mean. That’s a great suggestion to add flexibility for presentation. I’ll take a look when I have time.


No worries. Love the plug-in, fantastic for our use case still. We have a community-ran blog and it’s great that community members can showcase their blogs on their profile, and you can also get to them via the user card modal.

1 Like

I don’t have much time to work on things for free these days, but I was curious here.

Route is the correct term, I was having a memory lapse on how this worked. I’ve not worked on the portfolio system in many years (it’s been surprisingly resilient to Discourse changes :sweat_smile: )

I assume to get this to work you changed the file name for the “portfolio” route?





I think that’s a showstopper because the route name has to match the file name in EmberJS.

That blocks us, I believe, from changing the url from /portfolio to /blog dynamically in a setting, but happy to be corrected on that!

So I think the best you can do is change the Localised string in the theme locale setting:


Which will change the button text and the list title on the activity page … and live with the url if you need to use the master branch.

If you can get it working so that this can be changed in a setting whilst retaining the same default behaviour, PR welcome. (Same goes for any other reasonable improvements you’d like to make).

Firstly this theme component is amazing!
I’m actually new to discourse and don’t have much coding background. The other plug-ins directly get implemented when I install them and add to a theme, but this one is not working that way.
Can someone please help me with the steps?

1 Like