mbcahyono
(Muhlis Cahyono)
29 Agosto, 2017 22:35
1
Hey everyone,
I have created an example plugin to override default Activity Summary (digest) template:
https://github.com/muhlisbc/discourse-custom-activity-summary-template
Screenshot:
The main purpose of this plugin is to show how to override default .erb templates on Discourse.
I hope this helpful for someone.
26 Me gusta
Mark_Wass
(Mark Wass)
21 Febrero, 2023 05:17
2
@mbcahyono
Gracias por proporcionar tu plugin de ejemplo. Estoy intentando hacer algo similar, necesito reemplazar/sobrescribir el archivo /app/views/embed/comments.html.erb con el de mi plugin.
Este es mi repositorio:
https://github.com/OptDev/optuma-discourse-custom-embed
No estoy seguro de por qué esto no funciona, pensé que EmbedController sería la clase correcta para usar, pero obviamente estoy equivocado. ¿Tienes alguna sugerencia?
1 me gusta
Mark_Wass
(Mark Wass)
21 Febrero, 2023 06:44
3
@mbcahyono Finalmente lo conseguí, gracias por tu ayuda.
1 me gusta
thoka
(Thomas Kalka)
7 Marzo, 2023 16:09
4
El repositorio anterior ya no está disponible.
Me hubiera gustado poder aprender de él.
1 me gusta
@thoka Ese era mi repositorio, terminó en nuestro espacio privado en GitHub.
Fue un cambio muy básico, pero la esencia se puede ver aquí.
@Canapin Yes! Got it all working. Here is what the plugin.rb ended up looking like. Turned out I just had a path issue where I was putting the custom version of the file.
I ended up putting it in a folder /custom_views/embed/comments.html.erb
# frozen_string_literal: true
# name: optuma_discourse_custom_embed
# about: A simple plugin to used to customise the template in the forum embeds
# version: 1.0.0
# authors: Optuma Pty Ltd
# url: https://github.com/OptDev/optuma-discourse-custom-embed
#…
3 Me gusta