lib.jumpMenu = COA lib.jumpMenu { ### Create the opening form element; set action attribute to current page: 5 = HTML 5 { value { typolink { parameter.data = TSFE:id returnLast = url } wrap =
} } ### Create the select, optgroup and option elements: 10 = HMENU 10 { ### Form element contents must be contained in a block-level element wrap =
|
special = directory special.value = {$lib.jumpMenu.pid} 1 = TMENU 1 { ### Begin the select--we want a blank option at the top: wrap = expAll = 1 noBlur = 1 ### We have two top level pages named 'Pages A-M' and 'Pages N-Z'. These will become optgroup elements: NO { doNotShowLink = 1 allWrap.cObject = HTML allWrap.cObject { value.dataWrap = } wrapItemAndSub = | } } ### Create the dynamic option elements: 2 = TMENU 2 { NO { ### Don't show the link--it's just as easy to build it in this case: doNotShowLink = 1 ### Create an option tag that looks something like this '': allWrap.cObject = HTML allWrap.cObject { value { typolink { parameter.data = field:uid returnLast = url } dataWrap = } } } CUR < .NO CUR = 1 CUR { ### When it's the current page, we add the selected attribute to the option element: allWrap.cObject.value.dataWrap = } } } ### Create the closing form tag: ### 15 = HTML 15 { value =
} }