CMSMS left nav menu styling
Posted: Fri Oct 02, 2009 1:38 pm
Hi guys,
I'm currently attempting to design a menu using smarty based on the existing pages I have in my application. The problem is that some of these menus are two or three levels deep. This is currently what I have. I'm new to smarty and I'm not quite sure what I have to do to show additional sub items. Currently this only goes one level down.
Example
Product
>next level
I need
Product
>nextlevel
>Another level deep
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth != $node->prevdepth}
{if $node->depth > $node->prevdepth}
{elseif $node->depth prevdepth}
{/if}
{elseif $node->index > 0}
{/if}
{if $node->index == 0}
{assign var="icon" value="house"}
{elseif $node->haschildren == true }
{assign var="icon" value="folder"}
{elseif $node->haschildren == false }
{assign var="icon" value="page"}
{/if}
{if $node->current == true && $node->haschildren == false}
{else}
{/if}
{if $node->type == 'sectionheader'}
depth}">{$node->menutext}
{else}
id == 15}/{else}{$node->url}{/if}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
Any help would be appreciated.
Thanks
I'm currently attempting to design a menu using smarty based on the existing pages I have in my application. The problem is that some of these menus are two or three levels deep. This is currently what I have. I'm new to smarty and I'm not quite sure what I have to do to show additional sub items. Currently this only goes one level down.
Example
Product
>next level
I need
Product
>nextlevel
>Another level deep
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth != $node->prevdepth}
{if $node->depth > $node->prevdepth}
{elseif $node->depth prevdepth}
{/if}
{elseif $node->index > 0}
{/if}
{if $node->index == 0}
{assign var="icon" value="house"}
{elseif $node->haschildren == true }
{assign var="icon" value="folder"}
{elseif $node->haschildren == false }
{assign var="icon" value="page"}
{/if}
{if $node->current == true && $node->haschildren == false}
{else}
{/if}
{if $node->type == 'sectionheader'}
depth}">{$node->menutext}
{else}
id == 15}/{else}{$node->url}{/if}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
Any help would be appreciated.
Thanks