Smarty {break} and {continue} Tags
2 Attachment(s)
Thought I'd share this...
Smarty {break} & {continue} tags are not available in Smarty v2, but are in Smarty v3. They are handy, for example, if you want to truncate {foreach} or {section} items after x items / iterations. Code:
{foreach from=$foo item=x name=whatever} (stops on third item) Upload the attached two PHP files to /include/templater/plugins and you can use {break} and {continue} Might assist some of you out there :) |
Re: Smarty {break} and {continue} Tags
Phil, thanks for sharing this!
I've moved all other messages on switching XC4 to Smarty 3 into a separate thread: http://forum.x-cart.com/showthread.php?p=366487 |
Re: Smarty {break} and {continue} Tags
Thanks Phil!
New functionality worked a treat in this mod for wholesale prices in v4.6.4 http://forum.x-cart.com/showthread.php?p=377050#post377050 I bet there'll be some long scripts in the rest of the standard code that the {break} tag can be used in larger stores to help improve site speed. |
All times are GMT -8. The time now is 03:51 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.