# Example Plugin: Custom Activity Summary Template

**URL:** https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016
**Category:** Plugin
**Tags:** activity-summary
**Created:** [August 29, 2017, 10:35pm UTC](https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016 "2017-08-29T22:35:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mbcahyono](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbcahyono/32/97721_2.png) [@mbcahyono](https://meta.discourse.org/u/mbcahyono)
#### Post date: [August 29, 2017, 10:35pm UTC](https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016/1 "2017-08-29T22:35:53Z")

</div>

Hey everyone,

I have created an example plugin to override default Activity Summary (digest) template:

[https://github.com/muhlisbc/discourse-custom-activity-summary-template](https://github.com/muhlisbc/discourse-custom-activity-summary-template)

Screenshot:

[![](https://global.discourse-cdn.com/meta/original/4X/1/b/e/1be70444da1180926dcdcf4a720df25341ac2e6f.jpeg) ](https://raw.githubusercontent.com/muhlisbc/discourse-custom-activity-summary-template/master/custom-digest1.jpg)

[![](https://global.discourse-cdn.com/meta/original/4X/0/b/8/0b83dd60e757420e676f4a767b7295411baefc44.jpeg) ](https://raw.githubusercontent.com/muhlisbc/discourse-custom-activity-summary-template/master/custom-digest2.jpg)

The main purpose of this plugin is to show how to override default `.erb` templates on Discourse.  
I hope this helpful for someone.

---

<div class="post-metadata">

### Author: ![Mark\_Wass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_wass/32/290526_2.png) [@Mark\_Wass](https://meta.discourse.org/u/Mark_Wass)
#### Post date: [February 21, 2023, 5:17am UTC](https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016/2 "2023-02-21T05:17:55Z")

</div>

@mbcahyono

Thanks for supplying your example plugin. I’m trying to do something similar, I need to replace/override the /app/views/embed/comments.html.erb file with the one in my plugin.

This is my repo:

[https://github.com/OptDev/optuma-discourse-custom-embed](https://github.com/OptDev/optuma-discourse-custom-embed)

I’m not sure why this is not working, I thought EmbedController would be the correct class to use but I’m obviously wrong. Do you have any suggestions?

---

<div class="post-metadata">

### Author: ![Mark\_Wass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_wass/32/290526_2.png) [@Mark\_Wass](https://meta.discourse.org/u/Mark_Wass)
#### Post date: [February 21, 2023, 6:44am UTC](https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016/3 "2023-02-21T06:44:32Z")

</div>

@mbcahyono I finally got it working thank you for your help.

---

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [March 7, 2023, 4:09pm UTC](https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016/4 "2023-03-07T16:09:01Z")

</div>

Above repo is no longer available.  
Would have been glad to be able to learn from it.

---

<div class="post-metadata">

### Author: ![Mark\_Wass](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_wass/32/290526_2.png) [@Mark\_Wass](https://meta.discourse.org/u/Mark_Wass)
#### Post date: [March 7, 2023, 9:14pm UTC](https://meta.discourse.org/t/example-plugin-custom-activity-summary-template/69016/5 "2023-03-07T21:14:28Z")

</div>

@thoka That was my repo, it ended up in our private space on GitHub.

It was a very basic change but the gist of it can be seen here.

> [@How to show Full Name in Embeds](https://meta.discourse.org/t/how-to-show-full-name-in-embeds/255329/10):
>
> @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 #…
