[TYPO3] gmenu, splitchar, xy-offset
Sebastian Fuchs
sebastian at hexerei.net
Fri May 26 14:09:36 CEST 2006
Hello.
once again typo makes me feel like a complete idiot, because i couldnt
make this typoscript if-statment work.
probably some TS guru can help?? :)
I have a nice graphical menu (GMENU) generated from the page title. Now
when the page titles become too long I want to split the menu entries
into two rows. using splitChar and the | as splitting character, which
works fine. please, see the ts code below....
Now my problem is the height of the generated grafics.
what i would like to have is:
if there is a splitChar in the string set the XY - offset to double as
if there were no splitChar.
in other words:
if 20 is empty
then generate a grafic with XY = [10.w],[10.h] + [20.h] + 8
otherwise generate a grafic with XY = [10.w],[10.h] + [20.h] + 16
I dont have any clue where and how to insert this if-statment, perhaps
it can be solved differently.
every hint will be a great help.....
################
#TS-Code BEGIN :
################
lib.menu_mask = HMENU
lib.menu_mask.entryLevel = 0
lib.menu_mask {
#wrap = <ul class="nav">|</ul>
1 = GMENU
1 {
noBlur=1
#menu state NOrmal
NO = 1
NO {
expAll = 1
wrap = <li>|</li>
XY =[10.w] + 10 ,[10.h] + [20.h] + 8
10 = TEXT
10.textMaxLength = 30
10.text.field = title
10.text.override.field = nav_title
10.text.case = upper
10.fontFile = {$ttfFont}
10.fontColor = {$navNOcolor}
10.fontSize = 10pt
10.spacing = 0
10.antiAlias = 1
10.niceText=1
10.niceText.scaleFactor = 5
10.align=left
10.offset=0,10
10.text.listNum = 0
#First section before the |
10.text.listNum.splitChar = |
#Second section
20 = TEXT
20.textMaxLength = 20
20.text.field = title
20.text.case = upper
20.fontFile = {$ttfFont}
20.fontColor = {$navNOcolor}
20.fontSize = 10pt
20.align=left
20.offset=0,24
20.spacing = 0
20.antiAlias = 1
20.niceText=1
20.niceText.scaleFactor = 5
20.text.listNum = 1
#Second section after the |
20.text.listNum.splitChar = |
}
#menu state ACTive
ACT <.NO
ACT = 1
ACT.10.fontColor = {$navACTcolor}
ACT.20.fontColor = {$navACTcolor}
#menu state ROllover
RO <.NO
RO = 1
RO.10.fontColor = {$navROcolor}
RO.20.fontColor = {$navROcolor}
#menu state CURrent
CUR <.RO
CUR = 1
}
}
##############
#TS-Code END :
##############
thanks in advance,
best regards,
sebastian
More information about the TYPO3-english
mailing list