I found a couple of ways to handle recursion in Smarty, mostly based on including templates into themselves, which seems like ridiculous waste of resources. I found one solu
The best way is not to do it.
Smarty is supposed to be simple. This deesn't sound it.