Best practices for managing template modifications?

(Nabeel Naqvi) #1

I am integrating a jquery editor (jquery.ime) in text fields in discourse to enable typing Urdu. At the moment I am directly modifying the handlebar templates to include the javascript code. The problem is that these templates get overwritten with each update and have to be reworked again. What are better ways of managing such template modifications? I cannot find plugin outlets pertaining to most of the text fields that I am modifying. One solution could be to create a patch file and try to apply the patch after the update. I would be interested in learning about how others deal with this kind of situation.

(RĂ©gis Hanol) #2

You’ll have to write a plugin to overwrite the hbs file.

(Nabeel Naqvi) #3

Hi @zogstrip, thanks for the reply. Can you please share some pointers as to how hbs files can be modified with plugins?

(RĂ©gis Hanol) #4

Actually, if you’re only overwriting a template, you can do just that via a Theme :wink: