[TYPO3] Probem with TMENU and wrap

Peter Gallagher pgallagher at electricretina.com
Fri Sep 22 21:22:34 CEST 2006


Hi Peter,
Thanks for taking the time to help out. I did try what you suggested but 
it turns out that 'subst_elementUid' is only a property of TMENU_ITEM 
not TMENU. So what you suggested didn't work for me - but I did finally 
come up with the solution as follows:

Part of the problem with my question may have been a lack of some 
information about my menu. The goal is to create a drop-down css/js 
solution using a custom javascript.

Here is the HTML I needed:

<div id="item2" class="rootItem"  ><a href="#" 
onmouseover="showMenu('menu68',this);" onmouseout="btnTimer();">ABOUT 
US</a>
       <div id="menu68" class="level2" >
           <div class="firstItem"><a href="#" onmouseover="menuOver();" 
onmouseout="menuOut();">Vision</a></div>
           <div class="second"><a href="#" onmouseover="menuOver();" 
onmouseout="menuOut();">History</a></div>
           <div class="second"><a href="#" onmouseover="menuOver();" 
onmouseout="menuOut();">Leadership</a></div>
       </div>
</div>

This is the typoscript that worked for me:

#######################
# Top Menu cObject
#######################
lib.topmenu = HMENU

# First level menu
lib.topmenu.1 = TMENU
lib.topmenu.1.wrap = <p> | </p>
lib.topmenu.1{
 expAll = 1
 NO{
   # Normal state properties
   linkWrap = <div class="rootItem"> | </div>
 }
 IFSUB = 1
 IFSUB{
   linkWrap = <div class="rootItem">|</div>
   allWrap = |<div id="menu{elementUid}" class="level2">
   ATagParams = onmouseover="showMenu('menu{elementUid}',this);" 
onmouseout="btnTimer();"
   subst_elementUid = 1
 }
 subst_elementUid = 1
}

# Second level menu
lib.topmenu.2 = TMENU
lib.topmenu.2.subwrap = TEXT
lib.topmenu.2.subwrap.value = <div id="menu{field:title}" 
class="level2">|</div>
lib.topmenu.2.NO{
 allWrap =  |*| |*| |</div>
 linkWrap = <div class="firstItem">|</div> |*| <div 
class="second">|</div> |*| <div class="second">|</div>
 ATagParams = onmouseover="menuOver();" onmouseout="menuOut();"
}

My javascript that shows the second level menu is included in the head 
of the page.

Thanks for the help. I hope this will help someone else.

::share::
Peter

Peter Foerger wrote:
> Hi Peter,
>
>
> lib.topmenu.2 = TMENU
> lib.topmenu.2.subwrap = TEXT
> lib.topmenu.2.subwrap.value = <div id="menu{elementUid}"
> class="level2">|</div>
> lib.topmenu.2.subwrap.subst_elementUid = 1
> lib.topmenu.2.subwrap.insertData = 1
> lib.topmenu.2.wrap < lib.topmenu.2.subwrap.value
> lib.topmenu.2.NO{
> linkWrap = <div class="second">|</div>
>  ....
>  }
>
>
> {elementUid} does the trick ;)
>
> greetz
> Peter
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>   

-- 

Peter Gallagher
pgallagher at electricretina.com
m 705.345.4391
---------------------------------------------
Electric Retina
www.electricretina.com



More information about the TYPO3-english mailing list