CSS Menu issue
Posted: Tue Mar 04, 2008 2:46 am
Hey i'm sure this well dumb easy question but so far i have not been able to make it work... How would you get this
outputed... the close i got was
with this for the template
which by the way is missing links anyways lol... there 2 under services, 2 under family beginnings, 4 under about st. joseph ect... the low down i think i messed up an easy thing and now am triping over myself on this smarty system lol... thanks for the help
Code: Select all
<ul class="menulist" id="listMenuRoot">
<li><a href="#">Home</a></li>
<li>
<a href="#">Demo Submenu</a>
<ul>
<li><a href="#">Here's a submenu item.</a></li>
<li><a href="#">Items auto-size based on the text they contain.</a></li>
</ul>
</li>
<li>
<a href="#">Submenu #2</a>
<ul>
<li>
<a href="#">Nested menu 1</a>
<ul>
<li><a href="#">As many levels as you need.</a></li>
<li><a href="#">All styled via CSS.</a></li>
</ul>
</li>
<li>
<a href="#">Nested menu 2</a>
<ul>
<li><a href="#">Another nested menu.</a></li>
<li><a href="#">It's still built with nested lists.</a></li>
</ul>
</li>
<li><a href="#">These menus have true 'switch' timers.</a></li>
<li><a href="#">Imprecision doesn't mean collapse!</a></li>
</ul>
</li>
<li><a href="#">Easy to use!</a></li>
</ul>
Code: Select all
<ul class="menulist" id="listMenuRoot">
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/" >
St. Joseph Home
</a>
</li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/services/" >
Services
</a>
<ul><li></li></ul></li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/family-beginnings/" >
Family Beginnings
</a>
<ul><li></li></ul></li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/events-calendar/" >
Events Calendar
</a>
</li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/about-st-joseph/" >
About St. Joseph
</a>
<ul><li></li></ul></li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/foundation/" >
Foundation
</a>
<ul><li></li></ul></li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/gift-shop/" >
Gift Shop
</a>
</li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/employment-opportunities/" >
Employment Opportunities
</a>
</li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/find-a-doctor/" >
Find a Doctor
</a>
</li>
<li id="active">
<a href="http://www.sjrmc.org/St_Joe_Core/test_area/" >
Test_Area
</a>
<ul>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/test_area/test_par1/" >
Test_par1
</a>
<ul><li></li></ul></li>
<li>
<a href="http://www.sjrmc.org/St_Joe_Core/test_area/par2/" >
par2
</a>
</li>
</ul>
Code: Select all
{if $count > 0}
<ul class="menulist" id="listMenuRoot">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/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}
<li style="list-style-image: url('/images/icons/{$icon}_go.png') ">{$node->menutext}
{else}
<li style="list-style-image: url('/images/icons/{$icon}.png') ">
{if $node->type == 'sectionheader'}
<span class="sectionheader{$node->depth}">{$node->menutext}</span>
{else}
<a href="{if $node->id == 15}/{else}{$node->url}{/if}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
{/if}
{/if}
<br>{$node->titleattribute}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-2}</li>
</ul>
{/if}