[TYPO3] Possible to split a menu in half?

Jody Cleveland Cleveland at winnefox.org
Fri Feb 3 18:24:40 CET 2006


> Nevermind, I just got it. I'll post my code once I finish with it.

Here's my code. May not be pretty, but it works:

# Main Menu
###########################################
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0

# first menu row
lib.mainMenu {
  begin = 0
  maxItems = 6
  wrap = <div id="menu1">|</div>
}

# second menu row
lib.mainMenuX < lib.mainMenu
lib.mainMenuX {
  begin = 10
  wrap = <div id="menu2">|</div>
}

# first menu row config
lib.mainMenu.excludeUidList = 18,38,58
#lib.mainMenuX.excludeUidList = 7,8,9,10,18,38,58,63,64
lib.mainMenu.1 = GMENU
lib.mainMenu.1.NO.wrap = |
lib.mainMenu.1.NO.imgParams = class="navbarimg"
lib.mainMenu.1.NO {

XY =80,44
5 = IMAGE
5.file = fileadmin/templates/homepage/graphics/button.gif
10 = TEXT
10.niceText=1
10.text.listNum.splitChar=|
10.text.field = title
10.fontFile = fileadmin/fonts/Arial.ttf
10.offset=-2,25
10.align = center
10.fontSize = 9
10.text.listNum.splitChar=|
10.text.listNum=0
10.fontColor= #333333
10.if.isFalse.field = title
10.if.isFalse.listNum = 1
10.if.isFalse.listNum.splitChar=|
#This is the first line if there is a second. This has a low offset
15 < .10
15.if >
15.if.isTrue.field = title
15.if.isTrue.listNum=1
15.if.isTrue.listNum.splitChar=|
15.offset = -2,18
20 < .10
20.if >
20.text.listNum=1
20.offset=-2,23+10
}

lib.mainMenu.1.RO < lib.mainMenu.1.NO
lib.mainMenu.1.RO = 1
lib.mainMenu.1.RO {
5.file=fileadmin/templates/homepage/graphics/button_ro.gif
10.fontColor = red
15.fontColor = red
20.fontColor = red
}

lib.mainMenu.1.ACT < lib.mainMenu.1.NO
lib.mainMenu.1.ACT = 1
lib.mainMenu.1.ACT.wrap = |
lib.mainMenu.1.ACT.imgParams = class="navbarimg"
lib.mainMenu.1.ACT {
backColor = #fdfdfd
5.file=fileadmin/templates/homepage/graphics/button_act.gif
10.fontColor = white
15.fontColor = white
20.fontColor = white
}

# second menu row config
lib.mainMenuX.1 = GMENU
lib.mainMenuX.1.NO.wrap = |
lib.mainMenuX.1.NO.imgParams = class="navbarimg"
lib.mainMenuX.1.NO {

XY =80,44
5 = IMAGE
5.file = fileadmin/templates/homepage/graphics/button.gif
10 = TEXT
10.niceText=1
10.text.listNum.splitChar=|
10.text.field = title
10.fontFile = fileadmin/fonts/Arial.ttf
10.offset=-2,25
10.align = center
10.fontSize = 9
10.text.listNum.splitChar=|
10.text.listNum=0
10.fontColor= #333333
10.if.isFalse.field = title
10.if.isFalse.listNum = 1
10.if.isFalse.listNum.splitChar=|
#This is the first line if there is a second. This has a low offset
15 < .10
15.if >
15.if.isTrue.field = title
15.if.isTrue.listNum=1
15.if.isTrue.listNum.splitChar=|
15.offset = -2,18
20 < .10
20.if >
20.text.listNum=1
20.offset=-2,23+10
}

lib.mainMenuX.1.RO < lib.mainMenu.1.NO
lib.mainMenuX.1.RO = 1
lib.mainMenuX.1.RO {
5.file=fileadmin/templates/homepage/graphics/button_ro.gif
10.fontColor = red
15.fontColor = red
20.fontColor = red
}

lib.mainMenuX.1.ACT < lib.mainMenu.1.NO
lib.mainMenuX.1.ACT = 1
lib.mainMenuX.1.ACT.wrap = |
lib.mainMenuX.1.ACT.imgParams = class="navbarimg"
lib.mainMenuX.1.ACT {
backColor = #fdfdfd
5.file=fileadmin/templates/homepage/graphics/button_act.gif
10.fontColor = white
15.fontColor = white
20.fontColor = white
}

- jody



More information about the TYPO3-english mailing list