XF 2.2 Should we modify an add-on's template directly or should we use template modification?

Very basically I believe a template modification is useful if you are creating an addon or want it to apply across all styles as it affects the master templates.

Just editing a template only affects that style and it’s children, so that is probably the main difference with what you decide to do.

If an upgrade of xenforo changes templates you’ll get a notice to merge your customised templates, but not with your template modifications so I found it’s good to make sure they still work after an update that might affect the part you replaced or modified.
 
Just like Mr Lucky already said, but I prefer template modifications over template edits and then merging also for custom edits. I rather fix the template modification if there's a need too, but from my experience, you'll have less problem with template modifications then with merging templates. But maybe it's just me.
 
you'll have less problem with template modifications then with merging templates. But maybe it's just me.
My only problem with merging templates is when I get given the notice to make a choice between custom, new default or both. An experienced developer would deal with that without the head scratching.

But if the change is purely stylistic for one style then it really has to be a template edit of that style IMO
 
There is a third option if you are adding stuff and that is to make a new custom template which you insert into a xenforo style template. This is more likely to be a simple merge at an update.
 
Back
Top Bottom