# Can topic templates have javascript?

**URL:** <https://meta.discourse.org/t/can-topic-templates-have-javascript/146192>\
**Category:** Product Support\
**Created:** [March 30, 2020, 7:49pm UTC](https://meta.discourse.org/t/can-topic-templates-have-javascript/146192 "2020-03-30T19:49:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [March 30, 2020, 7:59pm UTC](https://meta.discourse.org/t/can-topic-templates-have-javascript/146192/2 "2020-03-30T19:59:33Z")

</div>

If you use tags you won’t have to write a plugin that will be likely to break every time templates change upstream. I recommend that you spend an hour or so trying that before starting to write a plugin.

You can have a look at [discourse-topic-previews-sidecar/plugin.rb at master · merefield/discourse-topic-previews-sidecar · GitHub](https://github.com/paviliondev/discourse-topic-previews/blob/master/plugin.rb) for an example of creating Topic Custom Fields.

---

_[View the full topic](https://meta.discourse.org/t/can-topic-templates-have-javascript/146192)._
