[Typo3] optionSplit and menu

Alex Lopez alex.lopezt at gmail.com
Mon Jun 27 15:48:38 CEST 2005


Hi all,
 
I'm creating horizontal menus for 2 and 3 menu levels.

Level 2 is included into a div and I'm using for it optionSplit
without problems but when there is only a level 3 menu, it doesn't run
fine.
 

# Menu 1 cObject
temp.menu_1= HMENU

  # First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
    # Normal state properties
  NO.allWrap = | <img src="fileadmin/template/images/sep_menu2.gif"
width="2" height="13">|*||*| |
  NO.ATagParams = class="item1"
}

temp.menu_1.2 = TMENU
temp.menu_1.2 {
  NO.allWrap = <div class="section" id="section">| |*| | |*| |</div>
  NO.ATagParams = class="item2"

}

I have problem in both of then, because if there is only a menuItem,
allways writes the last portion of the optionSplit (as it is explained
in tsref doc).

I'm trying to use a condition for, if there is only a level3 menuItem,
writing the whole div tag with the menuItem into it, but I'm thinking
that there is something I am not understanding well about how HMENU is
creating menus, i.e., how it iterates over different menuItems in both
levels.

There is someone that could help me? In case there is only a menuItem,
I want to write

NO.allWrap = <div class="section" id="section">|</div>

Kind regards,
Àlex



More information about the TYPO3-english mailing list