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


(Sung Kim) #1

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.


(Sung Kim) #2

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.


(Daniela) #3

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

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