[TYPO3] Multiline vertical GMENU
Karl Wallace
karl.wallace at roomthree.com
Thu Apr 17 10:56:44 CEST 2008
Hi all
I am using a GMENU to construct a vertical menu.
The problem I'm having is when the title of the menu item exceeds a
certain width.
For example one of the pages is called "Learning Community" I would like
to add a line break after the first word.
Learning Community - What it looks like now
Learning - What I want it to look like
Community
I did some research and found some code using the splitChar and listNum
functions which would seem to accomplish what I need.
My code is as follows:
lib.subMenu = HMENU
lib.subMenu.entryLevel = 1
lib.subMenu {
1 = GMENU
1.accessKey = 1
1.NO = 1
1.NO {
XY = [10.w],[10.h]+15
backColor = #5d5451
wrap = <div class="main_menu_first">| </div> |*| <div
class="main_menu_item"> | </div> |*| <div class="main_menu_last"> |
</div>
10 = TEXT
10.text.field = title
10.text.listNum.splitChar=|
10.text.listNum=0
10.fontColor = #edebe6
10.fontFile = fileadmin/fonts/ROCK.TTF
10.fontFace = fileadmin/fonts/ROCK.TTF
10.fontSize = 11
10.offset = 0,11
10.niceText = 1
10.antiAlias = 1
10.niceText.sharpen = 10
20 < .10
20.text.listNum=1
20.offset=0,11
}
While the splitChar function successfully splits the title, If I comment
out all the lines referring to the object 20. The menu item will be
"Learning".
However if I include those lines it seems to overlay the second word on
top of the first one. Changing the offset in the line 20.offset affects
both words not just the second one.
Does anyone know what I'm doing wrong, or have another approach to
creating multiline vertical menus using GMENU?
Thanks
Karl
More information about the TYPO3-english
mailing list