15 часов бодровствую , собственно уже голова пухнет и не могу найти де ошибка.
код
PHP:
скопировать код в буфер обмена
{function name=menu level=0} {function menu level=0} <ul> {foreach $mas.$parent_id as $cat} <li><a href='?cat={$cat.id_cat}'>{$cat.title}</a></li> {menu mas=$mas parent_id=$parent_id level=$level} {/foreach} {/if} </ul> {/function} {menu mas=$mas parent_id=$parent_id level=$level}
ошибка:
CODE ( htmlphp):
скопировать код в буфер обмена
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template ".\templates\blog.tpl" on line 30 "</div>" unclosed {function} tag' in S:\home\SPM.by\www\lib\sysplugins\smarty_internal_templatecompilerbase.php:621 Stack trace: #0 S:\home\SPM.by\www\lib\sysplugins\smarty_internal_smartytemplatecompiler.php(118): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unclosed {funct...') #1 S:\home\SPM.by\www\lib\sysplugins\smarty_internal_templatecompilerbase.php(171): Smarty_Internal_SmartyTemplateCompiler->doCompile(' ...') #2 S:\home\SPM.by\www\lib\sysplugins\smarty_internal_template.php(187): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template)) #3 S:\home\SPM.by\www\lib\sysplugins\smarty_internal_templatebase.php(164): Smarty_Internal_Template->compileTemplateSource() #4 S:\home\SPM.by\www\lib\sysplugins\smarty_internal_template.php(285): Smarty_Internal_TemplateBase->fetch(NULL, NULL, NULL, NULL, false, false, true) #5 S:\h in S:\home\SPM.by\www\lib\sysplugins\smarty_internal_templatecompilerbase.php on line 621
собственно я в шаблон передаю оч многомерный массив а посредством рекурсии формирую многоуровневый список за под уровни отвечает $parent_id , судя по ошибке пишет не закрыл функцию хотя она уже закрыта.(Отредактировано автором: 22 Июля, 2012 - 12:48:32)
|