[TYPO3] Menus which require unique classes on first and last item

Trevor McCartney trevor at arrayinteractive.ca
Fri Mar 30 06:03:15 CEST 2007


Hello Typo3 Folks!

I'm just starting to cut my teeth on the Typo3 system. As the documentation repeatedly suggests, there is a huge learning curve, I'm definitely overwhelmed at this point and have got a long way to go...

Anyhow after reading through some tutorials I'm starting to get an idea how to start implementing my html template into the CMS. I have a bit of a snag with the menus though.

I have 3 levels of dynamic menu systems. Which I don't think is a big deal, since the tutorials tell you how to set up 2 levels. The bigger problem I'm having is due to the nature of the design I'm working with.

Basically two of my menu's are horizontal menu bars, I've set up each menu as an unordered list and each menu item is a list item. The problem is that I have borders separating each menu item, but I can't have a left border on the first item or a right border on the last item. So I've set up two special classes, firstItem and lastItem, to remove the appropriate borders. So as far as integration with Typo3 goes, will I be able to set up conditions to determine if a menu item is the first/last and then apply the custom class in that case? I also have the selected class for when that menu item should be selected, so in that case I would need to be able to determine if the selected item is the first or last, then it would get a double class ie: class="firstItem selected". Is this all doable?

Am I making any sense? I know it would be a whole lot easier if all my menu items were exactly the same, but that will mean going back to the designer.

Thanks in advance for any help you can offer!

T.


More information about the TYPO3-english mailing list