SOLVED: MenuManager

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
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

SOLVED: MenuManager

Post by robinmarek »

CMS version 1.6.6

I've just transfered a site from one server to another (on the same type of hosting) and am using the section expand template for the Menu.

Now occasionally it gives this error, which goes away if I refresh the page. The menu stays there but it is pushed down by the error. It doesn't do it on the old site so can only assume something has gone strange in the transfer. Any ideas?
string(144) "Smarty error: [in module_db_tpl:MenuManager;sectionexpand line 16]: syntax error: unrecognized tag 'while' (Smarty_Compiler.class.php, line 590)" string(145) "Smarty error: [in module_db_tpl:MenuManager;sectionexpand line 20]: syntax error: unrecognized tag '/while' (Smarty_Compiler.class.php, line 590)" string(144) "Smarty error: [in module_db_tpl:MenuManager;sectionexpand line 57]: syntax error: unrecognized tag 'while' (Smarty_Compiler.class.php, line 590)" string(145) "Smarty error: [in module_db_tpl:MenuManager;sectionexpand line 61]: syntax error: unrecognized tag '/while' (Smarty_Compiler.class.php, line 590)"
This is the sectionexpand template:
{* 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}
Last edited by robinmarek on Fri Oct 09, 2009 6:13 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: MenuManager

Post by calguy1000 »

Where did you get this menu template from, it's not one of ours...
smarty doesn't have a {while} plugin so you must've downloaded one from somewhere, or this menu template never worked properly.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Re: MenuManager

Post by robinmarek »

You know it's weird I really can't remember where I got it from, I did it ages ago... I'll have to google and find out, but it actually did work on the other website it's just decided not to now.

Will let you know!
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Re: MenuManager

Post by robinmarek »

Actually I just found it - it was on the Wiki for CMS Made Simple:

http://wiki.cmsmadesimple.org/index.php ... ion_expand
robinmarek
Forum Members
Forum Members
Posts: 208
Joined: Thu Nov 13, 2008 4:02 pm

Re: MenuManager

Post by robinmarek »

And I actually just answered my own question... it's because I needed to create the compiler.while.php file and put it in the lib/smarty/pugin folder

Thanks calguy... I thought it was already a plugin with CMSMS I completely forgot I had to do all that!!
Post Reply

Return to “CMSMS Core”