• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Adding some pure html to a template. Do I use Template modification or listener ?

allewreK

Active member
#1
If I would like to add some html to an existing template, what do you suggest me to do, a listener like the old way, or a template modification linked to my addon ?

What's the better choice for performance ? development time ?

Regards.
 

Jeremy

Well-known member
#2
Unless you are releasing it as an add-on, edit the template directly.

If you are releasing it as an add-on, you should use a template modification. Template Hooks (the listener) are deprecated in 1.2.
 

allewreK

Active member
#3
Unless you are releasing it as an add-on, edit the template directly.

If you are releasing it as an add-on, you should use a template modification. Template Hooks (the listener) are deprecated in 1.2.
So a template modification is now (1.2) the only way to do it ? And it's not as good as editing directly the template for perfomance, is it ?
 

Jeremy

Well-known member
#4
The hook system still exists in 1.2, but is officially deprecated (should use TMs going forward).

If you aren't releasing it, you should edit the template directly.