Page 1 of 1
[Solved] Dynamic li item classes
Posted: Thu Aug 14, 2008 2:03 pm
by Thierry-eamon
CMSMS 1.4.1
MenuManager 1.5.1
Menu based on minimal_menu.tpl
I was wondering if it is possible to get a menu who automaticly assings classes to al list items.. i.e.
or only to the first end last list item.. i.e.
I hope someone can help me
Re: Dynamic li item classes
Posted: Thu Aug 14, 2008 5:33 pm
by Dr.CSS
There is a post about using smarty logic to get the first and last items to carry a special class...
Search, and I'll also post back if I find it...
Re: Dynamic li item classes
Posted: Fri Aug 15, 2008 7:23 am
by christiaans
That would be very easy, and solved before, as mark stated.
Just to freshen up my own memory, you could do this as follows:
this creates a class for every page, using the page's alias. You can also 'just' use this for the parent items, for instance:
{if $node->parent == true}
{/if}
Re: Dynamic li item classes
Posted: Fri Aug 15, 2008 3:08 pm
by Dr.CSS
Actually {$page_alias} won't work in menu manager, it does in the template, use {$node->alias} and yes this will give all a class...
Re: Dynamic li item classes
Posted: Mon Aug 18, 2008 6:15 am
by christiaans
Oops, my bad.

.
Re: Dynamic li item classes
Posted: Wed Aug 20, 2008 6:48 am
by christiaans
Topic closed & marked solved.