Page 1 of 1

CSS Menu issue

Posted: Tue Mar 04, 2008 2:46 am
by JeremyBASS
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

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>
outputed... the close i got was

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>
with this for the template

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}
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

Re: CSS Menu issue

Posted: Tue Mar 04, 2008 5:06 pm
by JeremyBASS
Ok i took another shoot at it today... I think i have it right but i only get one child layer on the current page only and i don't under stand why... here is what i have

Code: Select all

{if $count > 0}
<div id="menuwrapper">
<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->parent == true or ($node->current == true and $node->haschildren == true)}
	<li><a href="{$node->url}" 
			{if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}
			{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}
			{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}
			{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{elseif $node->current == true}
	<li><a href="{$node->url}" 
			{if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}
			{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}
			{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}
			{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{elseif $node->haschildren == true}
	<li><a href="{$node->url}" 
			{if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}
			{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}
			{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}
			{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{else}
	<li><a href="{$node->url}" 
			{if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}
			{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}
			{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}
			{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{/if}



{/foreach}

	{repeat string="</li></ul>" times=$node->depth-1}		</li>
	</ul>
<div class="clearb"></div>
</div>
{/if}
and the output

Code: Select all

<div id="menuwrapper">
<ul class="menulist" id="listMenuRoot">
	<li><a href="http://www.sjrmc.org/St_Joe_Core/" accesskey="1" title="Home Page, shortcut key=1"><dfn>1: </dfn>St. Joseph Home</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/services/"><dfn>2: </dfn>Services</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/family-beginnings/"><dfn>3: </dfn>Family Beginnings</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/events-calendar/"><dfn>4: </dfn>Events Calendar</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/about-st-joseph/"><dfn>5: </dfn>About St. Joseph</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/foundation/"><dfn>6: </dfn>Foundation</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/gift-shop/"><dfn>7: </dfn>Gift Shop</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/employment-opportunities/"><dfn>8: </dfn>Employment Opportunities</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/find-a-doctor/"><dfn>9: </dfn>Find a Doctor</a></li>
	<li><a href="http://www.sjrmc.org/St_Joe_Core/test_area/"><dfn>14: </dfn>Test_Area</a>
		<ul>
			<li><a href="http://www.sjrmc.org/St_Joe_Core/test_area/test_par1/"><dfn>14.1: </dfn>Test_par1</a></li>
			<li><a href="http://www.sjrmc.org/St_Joe_Core/test_area/par2/"><dfn>14.2: </dfn>par2</a></li>
		</ul>		
	</li>
</ul>
<div class="clearb"></div>
</div>
any ideas? I have looked through all of the doc files and nothing works ... I don't get it lol... thanks all...  :)

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 8:23 pm
by JeremyBASS
can some one tell me if this is right... i don't get the deal... it'd seem like it should be working but it only gets one child depth but only on the current... ???? i need depths execpt where i exclude from... an ideas would be great... thanks...

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 8:56 pm
by Nullig
Why can't you use the standard cssmenu template?

Nullig

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 9:13 pm
by JeremyBASS
well i did... but for some odd reason i only get the first child depth of the current page... then i try many different versions and nothing better... if i know for sure that the standard cssmenu template is suppost to do that then i'd know that the problem lay else where...  ;)

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 9:32 pm
by Nullig
Yes, it works that way.

How are you calling the cssmenu in your page template?
Have you included the cssmenu.js link for IE in your page template?

Nullig

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 9:55 pm
by JeremyBASS
How are you calling the cssmenu in your page template?
with:

Code: Select all

{cms_module module='menumanager' template='CSSmenu' collapse="1"}
Have you included the cssmenu.js link for IE in your page template?
sort of i'm using this:

Code: Select all

<__script__ language="JavaScript"  type="text/javascript" src="../Core_files/fsmenu/fsmenu.js"></__script>
Which does the fly out and what not... and it works just fine.... though if the cssmenu.js is poplating the menu then that is the reason why it is not working...

for the script I am using I just need and out put of



 
 
 
 


 
 
     
     
     
     
 
 
 


with links ofcoruse ;)

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 10:06 pm
by Nullig
Did you import the cssmenu.tpl into the db?

Try changing:

{cms_module module='menumanager' template='CSSmenu' collapse="1"}

to:

{cms_module module='menumanager' template='cssmenu.tpl' collapse="1"}

or:

{menu template='cssmenu.tpl' collapse="1"}

and add:





to your page template.

Nullig

Re: CSS Menu issue

Posted: Wed Mar 05, 2008 10:28 pm
by JeremyBASS
lol... i'm sorry i should have said that although is named close but it's just not totally the same... but shot everything down thats not the issues i tried the same thing... and although it works... it's just like that other in the fact that i only get on child depth for the current page and not for anything else... but putting that tpl in showed that it does know that there are more child to be had as i see the arrows but when i rollover nothing... only on the current page one child depth deep... ideas? ???

Re: CSS Menu issue

Posted: Thu Mar 06, 2008 12:03 am
by Nullig
Do you have a link to the site?

Nullig

Re: CSS Menu issue

Posted: Thu Mar 06, 2008 2:29 am
by JeremyBASS
Here is the test area... just rember that it's still a work in progress so no laughing ;D ... thanks for the taking the time... i have donated more then 50 hours to them but i'm freaing having to start over... well thanks again..
http://www.sjrmc.org/St_Joe_Core/test_area/

***update***
click on "test_area"'s child "Test_par1" in which you'll notice more of what i was talking about... only the child and parent of the current is showen... makes no sense to me lol

Re: CSS Menu issue

Posted: Thu Mar 06, 2008 9:48 am
by KO
collapse='0' should shown all the menu items which you hide with CSS and show with li:hover.

Re: CSS Menu issue

Posted: Thu Mar 06, 2008 5:21 pm
by JeremyBASS
;D lol see i know it was something stupid... thanks for the help... that was the problem