Smarty Error

I am creating a plugin that has a for loop in smarty template but I keep getting the following error.

User Error: Smarty error: [in /home/robustrp/public_html/plugins/ManagedMarketing/templates/overview.tpl line 7]: syntax error: unrecognized tag ‘for’ (Smarty_Compiler.class.php, line 590) in /home/robustrp/public_html/libs/Smarty/Smarty.class.php on line 1093

Backtrace -->

#0 Piwik_ErrorHandler(…) called at [:]
#1 trigger_error(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty.class.php:1093]
#2 Smarty->trigger_error(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty.class.php:1815]
#3 Smarty->_trigger_fatal_error(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty_Compiler.class.php:2256]
#4 Smarty_Compiler->_syntax_error(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty_Compiler.class.php:590]
#5 Smarty_Compiler->_compile_tag(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty_Compiler.class.php:312]
#6 Smarty_Compiler->_compile_file(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty.class.php:1489]
#7 Smarty->_compile_source(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty.class.php:1422]
#8 Smarty->_compile_resource(…) called at [/home/robustrp/public_html/libs/Smarty/Smarty.class.php:1261]
#9 Smarty->fetch(…) called at [/home/robustrp/public_html/core/View.php:132]
#10 Piwik_View->render(…) called at [/home/robustrp/public_html/plugins/ManagedMarketing/Controller.php:44]
#11 Piwik_ManagedMarketing_Controller->mmOverview(…) called at [:]
#12 call_user_func_array(…) called at [/home/robustrp/public_html/core/FrontController.php:138]
#13 Piwik_FrontController->dispatch(…) called at [/home/robustrp/public_html/index.php:53]

I am currently only using the example forloop off of smarty’s for loop page.

    {for $foo=1 to 3}
  • {$foo}
  • {/for}

Any help is appreciated.

You should use the smarty 2.X for loop, we dont use smarty 3