Right procedure to enable/disable likes column in the main page (2)

I read the previous topic, Right procedure to display likes (or anyother) column in the main page. I also want to have the likes column in the main page.

The solution was also provided by @sam. Adding this:

 <script>
 Discourse.TopicListComponent.reopen({
     showLikes: true
});
</script>

However, it does not work in my installation (version v1.7.0.beta11 +31). Do we have other solutions?

In addition, I’d like to disable Views column in the main page. I changed the script to:

 <script>
 Discourse.TopicListComponent.reopen({
     showLikes: true,
     showViews: false
 });
 </script>

But it does not work. Any right procedure for that?

I really think we should have a simple menu to turn on/off columns in the main menu.

1 Like

From another topic, I figured:

<script>
var TopicListComponent = require('discourse/components/topic-list').default;
TopicListComponent.reopen({
    showLikes: true
});
</script>

I was wondering how to turn off some columns? showViews: false still does not work.

4 Likes

You don’t need a script to hide columns, just some Css to add

.topic-list .views {
    display: none;
}
2 Likes

Do we have an updated topic / playbook on this for people who want the likes column on Discourse latest @dax?

2 Likes

Now we have a dedicated theme component to make things very easy for all our users:

8 Likes