The add-on I am currently working on uses about thirty unique phrases that is used in one template, so a xf:foreach cannot be used and therefore the template will be about ten times larger than it should be. So I decided to have the controller fetch the phrases, causes one additional query (no big deal), and now I can use a xf:foreach, for each item, reducing the macro code to about the tenth of it's original size.
So, my question is which approach is better, fetch the phrases in the controller, or don't be concerned about the template size? I'm for fetching the phrases myself, and I am looking for your opinion. Thanks,
So, my question is which approach is better, fetch the phrases in the controller, or don't be concerned about the template size? I'm for fetching the phrases myself, and I am looking for your opinion. Thanks,