[TYPO3] URGENT | Linking of top menu selection with Left menu display

Saurabh Pareek [srijan.in] saurabh at srijan.in
Fri Jun 2 15:48:05 CEST 2006


Hi Abhishek !!

Try with this code...manipulate this acc. to ur requirement....


# Horizontal dropdown menu
#######################################
lib.topnavi = HMENU
lib.topnavi {
  maxItems = 9
  #wrap = <div id="menu" style="width:100%"> | </div>
  entryLevel = 0
  1 = TMENU
  1 {
    expAll=1
    wrap = <ul id="nav"> | </ul>
    NO {
      wrapItemAndSub = <li style="padding:0; margin:0; background: 
transparent url(fileadmin/images/nav_curve_left.jpg); width:16px; 
height:31px;"></li><li> | </li><li style="padding:0; margin:0; 
background: transparent url(fileadmin/templates/images/white_bar.gif); 
width:3px; height:31px;"></li>  |*| <li> | </li><li style="padding:0; 
margin:0; background: transparent 
url(fileadmin/templates/images/white_bar.gif); width:3px; 
height:31px;"></li>  |*|  <li> | </li><li style="padding:0; margin:0; 
background: transparent url(fileadmin/images/nav_curve_right.jpg); 
width:16px; height:31px;"></li>
    }
  }
  2 = TMENU
  2 {
    expAll=1
    wrap = <ul> | </ul>
    NO {
      wrapItemAndSub = <li> | </li>
    }
  }

}


//Left menu-------------------------------------
lib.leftnavi = HMENU
lib.leftnavi.entryLevel = 1
#lib.leftnavi.wrap = <table border=0 width="100%" cellpadding="0" 
cellspacing="0" class="text12"> | <tr><TD 
class="text11">..........................................</TD></tr></table>
lib.leftnavi.wrap = <table border=0 width="100%" cellpadding="0" 
cellspacing="0" class="text12"> | </table>
lib.leftnavi.1 = TMENU

lib.leftnavi.1 {
      NO.ATagTitle.field = title
      NO.linkWrap = <tr><td class="leftnavi_no" width="92%"> | </td><td 
width="8%">&nbsp;</td></tr><tr><TD 
class="text11">..........................................</TD></tr> |*| 
<tr><td class="leftnavi_no" width="92%"> | </td><td 
width="8%">&nbsp;</td></tr><tr><TD 
class="text11">..........................................</TD></tr> |*| 
<tr><td class="leftnavi_no" width="92%"> | </td><td 
width="8%">&nbsp;</td></tr><tr><TD 
class="text11">..........................................</TD></tr>
      #NO.allWrap = <tr><td class="leftnavi_no" width="126" 
height="25px"> |</td></tr>
      #NO.linkWrap = <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td> | </td></tr><tr><TD 
class="text11">..........................................</TD></tr></table>

      ACT = 1
      ACT.linkWrap = <tr><td class="leftnavi_no" width="92%" 
style="font-weight:bold;">| </td><td width="8%">&nbsp;</td></tr><tr><TD 
class="text11">..........................................</TD></tr> |*| 
<tr><td class="leftnavi_no" width="92%" style="font-weight:bold;">| 
</td><td width="8%">&nbsp;</td></tr><tr><TD 
class="text11">..........................................</TD></tr> |*| 
<tr><td class="leftnavi_no" width="92%" style="font-weight:bold;">| 
</td><td width="8%">&nbsp;</td></tr><tr><TD 
class="text11">..........................................</TD></tr>
      #ACT.allWrap =  <tr><td class="leftnavi_act" width="126"> |</td></tr>
      #ACT.linkWrap = <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td style="font-weight:bold;">| </td></tr></table>
      ACT.ATagTitle.field = title
 }


#####################
# Second level menu-object
#####################

  lib.leftnavi.2 = TMENU

  lib.leftnavi.2 {
      expAll = 0
      NO.wrap = |
      NO.ATagTitle.field = title
      NO.allWrap = <tr><td width="100%" height="20px"> |</td></tr>
      NO.linkWrap = <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td width=8></td><td id="leftnavi2_no" valign=top> | 
</td></tr></table> |*| <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td width=8></td><td valign=top id="leftnavi2_no"> | 
</td></tr></table> |*| <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td width=8></td><td valign=top id="leftnavi2_no"> | 
</td></tr><tr><TD width=145 colspan=2 
class="text11">..........................................</TD></tr> 
</table>     
#NO.linkWrap = <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td id="leftnavi2_no"> | </td></tr></table>

      ACT = 1
      ACT.allWrap =  <tr><td width="100%" height="20px"> |</td></tr>
ACT.linkWrap = <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td width=8></td><td valign=top id="leftnavi2_act" 
style="font-weight: bold;"> | </td></tr></table> |*| <table 
cellpadding="0" cellspacing="0" width="100%"><tr><td width=8></td><td 
valign=top id="leftnavi2_act" style="font-weight: bold;"> | 
</td></tr></table> |*| <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td width=8></td><td valign=top id="leftnavi2_act" 
style="font-weight: bold;"> | </td></tr><tr><TD width=145 colspan=2 
class="text11">..........................................</TD></tr> </table>
#      ACT.linkWrap = <table cellpadding="0" cellspacing="0" 
width="100%"><tr><td id="leftnavi2_act" style="font-weight: bold;"> | 
</td></tr></table>
      ACT.ATagTitle.field = title
  }

:-)
Cheers,
Saurabh Pareek

Abhishek wrote:
> Hi All,
> I am working on Top navigation implementation. For the
> following site structure -
> 	A
> 		A10
> 			A100
> 			A110
> 		A20
> 			A200
> 			A210 
> 	B
> 		B10
> 			B100
> 			B110
> 		B20
> 			B200
> 			B210 
> 	C
> 		C10
> 			C100
> 			C110
> 		C20
> 			C200
> 			C210 
>
> 	
> Following is the summary of what I need to do and what
> I have done : 
>   Req 1 >  Display Top-navigation bar. This must show
> only : A, B, C 
>   
>   Req 2 > When user rolls over the mouse over any of
> tob navigation menu items, say A, 
>   	drop-down should only show A10 and A20.(strictly 1
> level of menu)
>   
>   Req 3 > When user clicks on A, left navigation
> should display A10 and A20. 
>   	Upon clicking A10 or A20, corresponding submenu
> should unfold. [(A100, A110) or (A200, A210)]
>   	
>   Req 4 > Display the left most item on Top navigation
> active. A will be active in top navigation, 
>      	and childs of A - A10 and A20 will be displayed
> in left navigation. by default, A100 will be active
> link.
>
> To understand it better, I need exactly something like
> www.typo3.org, where depending upon top menu. left
> menu changes.
> I only need to add hover over thing and I have
> accomplished it, through help from forum members.
>
> I have accomplished Req 1 and Req 3. 
> Issue I am facing with Req 2 is - I can't link the
> menu clicked at Top navigation with display of
> Sub-menu.
> I desparately need a solution on this, sooner the
> better. Any pointers will be helpful.
>
> I appreciate the time and effort from all community
> members on this and will be grateful for all your
> help.
>
> Thanks,
> Abhishek
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>   




More information about the TYPO3-english mailing list