[TYPO3-english] typoscript multi-column mega-menu

jaco graaff jaco at spacexplorer.co.za
Mon Sep 19 08:49:49 CEST 2011


thx for the feedback

i used the following solution

I still don't fully understand the condition/if etc.. in typo3 and why I 
target both the allWrap and allwrap

basically, the more columns I want to add - just test against the modulus % 
columns

##--------------------------------------------------------------------------------------

lib.threeColumn >
lib.threeColumn = COA
lib.threeColumn {
    10.wrap = col1<br>|
    10 = HMENU
    10.special = directory
    10.special.value = {$SERVICES_PID}
    10.1 = TMENU
    10.1.NO{
        allWrap=1: |<br>


        stdWrap.if.isFalse.prioriCalc=1
        stdWrap.if.isFalse.cObject=TEXT
        stdWrap.if.isFalse.cObject.insertData=1
        stdWrap.if.isFalse.cObject.value=({register:count_HMENU_MENUOBJ}+2)%3

        allWrap.if.isFalse.cObject=TEXT
        allWrap.if.isFalse.prioriCalc=1
        allWrap.if.isFalse.cObject.insertData=1
        allWrap.if.isFalse.cObject.value=({register:count_HMENU_MENUOBJ}+2)%3
    }


20 < .10
20.wrap = col2<br>|
    20.1.NO{
        allWrap=2: |<br>
        stdWrap.if.isFalse.cObject.value=({register:count_HMENU_MENUOBJ}+1)%3
        allWrap.if.isFalse.cObject.value=({register:count_HMENU_MENUOBJ}+1)%3
    }

30 < .10
30.wrap = col3<br>|
    30.1.NO{
        allWrap=3: |<br>
        stdWrap.if.isFalse.cObject.value=({register:count_HMENU_MENUOBJ})%3
        allWrap.if.isFalse.cObject.value=({register:count_HMENU_MENUOBJ})%3
    }
}

##--------------------------------------------------------------------------------------




so - if I wanted a 4th column
I would just add.............

##copy the code of .10 and just make necessary changes
40 < .10
## obviously the %3 would change to %4 in all code blocks
## I would then just test against +4 (1st column), +3 (2nd column), ...... 
+0(4th column)






More information about the TYPO3-english mailing list