I have a horizontal menu with a separator between each item created using the border-right css property. I don't want the last item in the menu to have the border, but I can't figure out how to determine whether a menu item is the last one or not. Is there a $node property for this?
thanks!
leslye.
How to determine the last item in a menu?
-
- New Member
- Posts: 5
- Joined: Thu Jul 12, 2007 3:48 am
Re: How to determine the last item in a menu?
Have you tried to compare $count with $node->index
?
$count contains the amount of menu elements.
$node->index contains the number of every menu element.
Note: $node->index begins with element 0 so the maximum value of it has a difference of 1 to $count.

$count contains the amount of menu elements.
$node->index contains the number of every menu element.
Note: $node->index begins with element 0 so the maximum value of it has a difference of 1 to $count.