1. 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 ?

Discussion in 'XenForo Development Discussions' started by allewreK, Aug 9, 2013.

  1. allewreK

    allewreK Active Member

    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 ?

  2. Jeremy

    Jeremy Well-Known Member

    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.
  3. allewreK

    allewreK Active Member

    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 ?
  4. Jeremy

    Jeremy Well-Known Member

    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.
  5. allewreK

    allewreK Active Member

    Ok thanks you very much King.

Share This Page