Canapin
(Coin-coin le Canapin)
26 Abril, 2023 21:52
3
Hola!
Puedes anular la plantilla y agregar esta información, como muestra @steven aquí en su componente que cambia la vista móvil. El componente en sí no agrega el recuento de vistas, pero él explica cómo agregar el recuento en la plantilla:
It’s doable
[image]
I don’t know if I would put this in the default settings, but if you want to try it, here is the code to add in the header section
{{d-icon "eye"}} {{number topic.views numberKey="views_long"}}
and
{{#if hasLikes}}{{d-icon "heart"}} <a href='{{topic.summaryUrl}}'>{{number topic.like_count}}</a>{{/if}}
For my screen, I used this:
<script type='text/x-handlebars' data-template-name='mobile/list/topic-list-item.hbr'>
<td class="topic-list-data">
{{~raw-plugin-outlet nam…
Más información sobre cómo anular plantillas: https://meta.discourse.org/t/beginners-guide-to-developing-discourse-themes/93648#overriding-discourse-templates-23
También puedes echar un vistazo a esto: Display replies and likes count in mobile view
Por cierto, encontré los enlaces usando la búsqueda
5 Me gusta