XF 2.1 Which way is better when dealing with many phrases?

Lawrence

Well-known member
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,
 
Grouped phrases? Example: tckSample_text.example1, tckSample_text.example2, tckSample_text.example3, tckSample_text.example4 and so on
 
My phrases are grouped like this eae_stt_example_1, eae_stt_example_2, and so on... Am I about to learn something new? :)
 
Top Bottom