{foreach $rules as $rule}
{php}
if(!strpos($rule['name'],'/')){
$ruleName = $rule['name'].'/index';
$controller = strtolower($rule['name']);
}else{
$ruleName = $rule['name'];
$controller = substr($rule['name'],0,strpos($rule['name'],'/'));
}
$controller = str_replace('manager.', '', $controller);
{/php}
{if $controller == 'content'}
{if !empty($menus)}
-
{$rule['title']}
{foreach $menus as $menu}
{if isset($menu['children']) && count($menu['children'])}
{else /}
{/if}
{/foreach}
{/if}
{elseif $rule['parent_id'] == 0 /}
-
{if isset($rule['children']) && count($rule['children'])}
{$rule['title']}
{foreach $rule['children'] as $child}
{php}
if(!strpos($child['name'],'/')){
$childRuleName = $child['name'].'/index';
}else{
$childRuleName = $child['name'];
}
{/php}
-
{$child.title}
{/foreach}
{else /}
{$rule.title}
{/if}
{/if}
{/foreach}