[Typo3] HMENU / TMENU wrap problem

JoH info at cybercraft.de
Sat May 28 01:20:21 CEST 2005


>> Sorry for being unclear.  What I want is for each level-1 menu item
>> to be wrapped in <div></div>, and for each level-2 item to be a list
>> of linked titles within it seperated by <br /> within the <div>
>> blocks.  The code sample above actually comes close to this, it just
>> won't add the </div>s.
>>
>> I had a feeling i couldn't add the pipe token more than once - is
>> there a workaround for that?
>
>
> Yep, as mentioned, it's 'dataWrap' in certain circumstances. Check my
> previous post for doc references.

Sorry, but I have to step in here, before it's getting really weird.

You need two wraps of the TMENUITEM + dataWrap here.
wrapItemAndSub -> will enclose the item and the submenu with the trailing
</div>
allWrap -> has stdWrap properties to get the "id" into the leading <div>

The stuff in the second menu is completely wrong.
"before" is simple HTML and/or stdWrap properties.
after is useless here. allWrap will do.

temp.menu_3 = HMENU
temp.menu_3 {
    1 = TMENU
    1 {
        expAll = 1
        NO {
            doNotShowLink = 1
            allWrap.cObject = TEXT
            allWrap.cObject {
                dataWrap = <div "{field:uid}Menu">|
           }
            wrapItemAndSub = |</div>
        }
    }

    2 = TMENU
    2 {
        noBlur = 1
        NO {
            before = <img
src="/fileadmin/template/main/images/green_sq_bullet.gif"
class="menu_bullet" />
            allWrap = |<br />
        }
    }
}

tested and working

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list