Smarty loop overhead question
Posted: Thu Jan 08, 2015 9:38 pm
I have a need for a simple loop in a template. Smarty 3 (s9y >=1.7) has the function {for}, ie {for $var=$start to $end} ... but smarty 2 (s9y < 1.7) doesn't have that. Closest I could find was {section}, as in {section name=whatever loop=$end}, which also works in smarty 3.
Is it worth doing a conditional test on $head_version, then using the corresponding function (for > 3, section < 3), or just live with {section} since it works in both? Is there an overhead impact?
Is it worth doing a conditional test on $head_version, then using the corresponding function (for > 3, section < 3), or just live with {section} since it works in both? Is there an overhead impact?