Menu Manager Smarty Error

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Kristy
Forum Members
Forum Members
Posts: 20
Joined: Tue Jul 10, 2007 3:56 pm

Menu Manager Smarty Error

Post by Kristy »

Hi I am using v 1.1.2 My site is almost complete and everthing has worked great. I seem to be getting a sporadic smarty error when I switch between pages. It doesn't happen all of the time and all I have to do is re load the page and the error goes away.

Can anyone help me with the error below?

Code: Select all

string(145) "Smarty error: [in module_db_tpl:MenuManager;section_expand line 17]: syntax error: unrecognized tag 'while' (Smarty_Compiler.class.php, line 590)" string(146) "Smarty error: [in module_db_tpl:MenuManager;section_expand line 21]: syntax error: unrecognized tag '/while' (Smarty_Compiler.class.php, line 590)" string(145) "Smarty error: [in module_db_tpl:MenuManager;section_expand line 49]: syntax error: unrecognized tag 'while' (Smarty_Compiler.class.php, line 590)" string(146) "Smarty error: [in module_db_tpl:MenuManager;section_expand line 53]: syntax error: unrecognized tag '/while' (Smarty_Compiler.class.php, line 590)" 
The site is http://rambouilletsheep.org

Any advice or help would be appreciated!

Thanks
cyberman

Re: Menu Manager Smarty Error

Post by cyberman »

Can you post your menu template?
Kristy
Forum Members
Forum Members
Posts: 20
Joined: Tue Jul 10, 2007 3:56 pm

Re: Menu Manager Smarty Error

Post by Kristy »

I sure can...

{* CSS classes used in this template:
#active - The active/current page
li#separator - To style the ruler for the separator
span.sectionheader - To style section header *}
{if $count > 0}



{assign var="prevdepth" value="1"}
{foreach from=$nodelist item=node}
{assign var="prevdepth" value=$prevnode->depth}
{if ($node->depth haschildren == "1")} {* bugfix if subitems were not shown in menu *}
{else}
{if $node->depth depth}
{while (($act_depth > 0) and ($collapseopened > 0))}

{assign var="act_depth" value=$act_depth-1}
{assign var="collapseopened" value=$collapseopened-1}
{/while}
{else}

{/if}
{/if}
{/if}

{if $node->type == 'separator'}

{else}
{if $node->current == true}
{else}
{/if}
id}" {if $node->type != 'sectionheader'}href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}{/if}{if $node->haschildren == '1'}
{assign var="collapseopened" value=$collapseopened+1} onclick="expandcontent('sub{$node->id}')"{else}{/if} style="cursor:hand; cursor:pointer">
{if $node->type == 'sectionheader'}{/if}
{$node->menutext}
{if $node->type == 'sectionheader'}{/if}

{if $node->haschildren == '1'}id}" class="expand">{/if}
{/if}
{assign var="prevnode" value=$node}
{/foreach}

{if ($prevnode->haschildren == "1")} {* bugfix if subitems were not shown in menu *}
{else}
{if $prevnode->depth > 1}
{assign var="act_depth" value=$prevnode->depth-1}
{while (($act_depth > 0) and ($collapseopened > 0))}

{assign var="act_depth" value=$act_depth-1}
{assign var="collapseopened" value=$collapseopened-1}
{/while}
{else}

{/if}
{/if}



{/if}


Thanks,
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu Manager Smarty Error

Post by Dr.CSS »

The 'while'  '/while' lines are not in your menu template so they must be coming from the the JS, maybe the smarty calls need to be updated in it...
Kristy
Forum Members
Forum Members
Posts: 20
Joined: Tue Jul 10, 2007 3:56 pm

Re: Menu Manager Smarty Error

Post by Kristy »

Thanks for looking!

Ok I'll bite...  How do I update the smarty calls?


Thanks!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu Manager Smarty Error

Post by Dr.CSS »

I can't get it to do the error, any reason you are using the expanding menu, in IE6 it stays expanded when clicking thru the page anchor links but in Firefox they collapse and changing pages make them open then close...

You could use another menu template and use the collapse='1' in the menu tag to get it to only show relevant pages below...

Like home page of default install...
Kristy
Forum Members
Forum Members
Posts: 20
Joined: Tue Jul 10, 2007 3:56 pm

Re: Menu Manager Smarty Error

Post by Kristy »

Thanks for the info. I hadn't checked the menu in other browsers yet. Thank you for doing that. I'll try another menu and see how that works.

Thank you very much for your time.
cyberman

Re: Menu Manager Smarty Error

Post by cyberman »

mark wrote: The 'while'  '/while' lines are not in your menu template
Smarty has not a while construct and you have to write Smarty inside MenuManager template.
Post Reply

Return to “CMSMS Core”