When do you create an addon instead of a simple template edit?

Marcus

Well-known member
There are lots of situations where I am undecided whether I just do a template edit, or write an addon that puts a new template into a template hook. Do you prefer to just do template edits or do you prefer to create an addon for that?

I like the idea of just using a stock xenforo with only as few template edits as possible.
 
There are lots of situations where I am undecided whether I just do a template edit, or write an addon that puts a new template into a template hook. Do you prefer to just do template edits or do you prefer to create an addon for that?

I like the idea of just using a stock xenforo with only as few template edits as possible.

I always try to not do template edits. What I have done in my own forum was to create only one add-on to do all changes that I need to do.
 
It's a tradeoff really... Addon/hook location means you don't need to muck with the template on upgrades if that template was changed in the master. The downside is it's slightly slower since it has the overhead of needing to go through the event listener system.

When I *do* do direct template edits that are just adding something, I tend to make my own template with the addition, and then do in a template include... that way the edit to the master template is minimal:

Code:
<xen:include template="my_custom_template" />
 
When I *do* do direct template edits that are just adding something, I tend to make my own template with the addition, and then do in a template include... that way the edit to the master template is minimal:

Code:
<xen:include template="my_custom_template" />

Thats what I like too.
Jon is starting to teach me a way to collect all my sidebar includes in one additional template which will be good for upgrade too. (Not with a listener)
 
It's a tradeoff really... Addon/hook location means you don't need to muck with the template on upgrades if that template was changed in the master. The downside is it's slightly slower since it has the overhead of needing to go through the event listener system.

When I *do* do direct template edits that are just adding something, I tend to make my own template with the addition, and then do in a template include... that way the edit to the master template is minimal:

Code:
<xen:include template="my_custom_template" />
There was created Template Modifications System for XenForo so you can make such modifications without touching templates
 
Top Bottom