Page 1 of 1

Help With Navigation

Posted: Sat Apr 28, 2007 10:25 am
by iamdinux
Ok, my navigation is REALLY easy.

Code: Select all

<div id="wrap"><div id="header"><ul>
{if $count > 0}
	{foreach from=$nodelist item=node}
		{if $node->current == true and $node->child == false}
			<li><a href="{$node->url}"><span>{$node->menutext}</a></il>
		{/if}
	{/foreach}
{/if}
</ul></div></div>
I need/want to take what I have here and just make it show that it doesn't show the child nodes. I have a menu on the side of the page that has the child nodes in it so this one I do not want to show them. Any help is appreciated.

And for this one below, I want to show the children links pushed over a bit.

Code: Select all

{if $count > 0}
	{foreach from=$nodelist item=node}
		{if $node->current == true}
			<tr><td class="nav_body" style="background-color:#dadada;"><img border="0px" height="16px" src="images/bullet.gif" width="20px" /> {$node->menutext}</td></tr>
		{elseif $node->parent == true}
			<tr><td class="nav_body"><img border="0px" height="16px" src="images/bullet.gif" width="20px" /> <a href="{$node->url}">{$node->menutext}</a></td></tr>
		{else}
			<tr><td class="nav_body"><img border="0px" height="16px" src="images/bullet.gif" width="20px" /> <a href="{$node->url}">{$node->menutext}</a></td></tr>
		{/if}
	{/foreach}
{/if}
Example child link:

Code: Select all

			<tr><td class="nav_body"><img border="0px" height="16px" src="images/bullet.gif" width="20px" />    <a href="{$node->url}">{$node->menutext}</a></td></tr>
Thank you!

Re: Help With Navigation

Posted: Sun Apr 29, 2007 4:20 am
by iamdinux
Well, I got one of them figured out.

number_of_levels = '1'

Adding that to the menus for the top worked out fine. Now if I would just figure out how to indent the child links I would be set!

Re: Help With Navigation

Posted: Sun Apr 29, 2007 7:15 am
by KO
What about

ul,li {padding:0px;margin:0px;}

ul ul {padding-left:10px;}

or
li li {padding-left:10px;}

or

li li a {padding-left:10px;text-indent:10px;}

Also close the in your navigation template with .

Re: Help With Navigation

Posted: Mon Apr 30, 2007 8:00 am
by iamdinux
I am using tables not unordered lists so it wont work.