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

XF 1.4 Best way to modify templates

Discussion in 'Styling and Customization Questions' started by Mr Lucky, Nov 6, 2014.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    Through reading tips and a bit of trial and error I'm gradually understanding how to customise templates etc.

    But I have a couple of questions for the experts.
    1. To change something in a template, is it always best to create a template modification rather than edit the code in the actual template?
    2. If I am adding something via a template modification, is there any preference to either:
    • Just add the block of text/code I want to add via Find/Replace?
    • Create a custom template and then just add an include linking to that template via Find/Replace?
    Any other methods?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Skylined likes this.
  3. Mr Lucky

    Mr Lucky Well-Known Member

    Thanks, that makes sense.

    If a template is updated, and the "find" is changed, would there be a warning?

    What happens if the templated becomes updated and the "find" then appears twice?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    No warning, the template modification would no longer be applied.

    This is why, when upgrading, you need to check that all template modifications are still valid and are applied.

    This is why you need to do the find on the smallest piece of code possible, without being ambiguous.

Share This Page