PHP smarty recursion?

无人久伴 提交于 2019-12-12 02:33:20

问题


I'm new to smarty templates but is it possible to do recursion in the actual template vs throughout a php custom smarty function?

Example please.

Any Advice appreciated!


回答1:


See if this link helps you

http://www.smarty.net/forums/viewtopic.php?t=291

In short, it might be possible, but isn't the best idea. Recursion when not handled properly can lead to a lot of trouble and template engines aren't designed for recursion.




回答2:


You can do recursive templates through {include} and {function}. For the latter, Recursive menu {function} example exitst.



来源:https://stackoverflow.com/questions/9562709/php-smarty-recursion

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!