2016-05-14 160 views
0

我是Typo3中的新人,我想知道是否有可能在typo3 Hmenu中轉換(使用typoscript)以下html-css菜單結構。這是一個html列表的多級結構。非常感謝!typo3網站菜單與typoscript

 <ul class="nav navbar-nav"> 
     <!-- Home --> 
     <li class="dropdown"> 
      <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> 
      Home 
      </a> 
      <ul class="dropdown-menu"> 
      <li><a href="index.html">Option 1: Default Page</a></li> 

      <!-- One Page --> 
      <li class="dropdown-submenu"> 
       <a href="javascript:void(0);">Option 2: One Page</a> 
       <ul class="dropdown-menu"> 
       <li><a target="_blank" href="One-Pages/Classic/index.html">- One Page Template</a></li> 
       <li><a target="_blank" href="One-Pages/Classic/one_page_dark.html">- One Page Dark Option</a></li> 
       </ul> 
      </li> 
      <!-- End One Page --> 

      </ul> 
     </li> 
     <!-- End Home --> 

     <!-- Pages --> 
     <li class="dropdown"> 
      <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown"> 
      Pages 
      </a> 
      <ul class="dropdown-menu"> 
      <!-- About Pages --> 
      <li class="dropdown-submenu"> 
       <a href="javascript:void(0);">About Pages</a> 
       <ul class="dropdown-menu"> 
       <li><a href="page_about2.html">About Us </a></li> 
       <li><a href="page_about3.html">About Us 1</a></li>      
       </ul> 
      </li> 
      <!-- End About Pages --> 

      <!-- Service Pages --> 
      <li class="dropdown-submenu"> 
       <a href="javascript:void(0);">Service Pages</a> 
       <ul class="dropdown-menu"> 
       <li><a href="page_services.html">Our Services</a></li> 
       </ul> 
      </li> 
      <!-- End Service Pages -->    
      </ul> 
     </li> 
     <!-- End Pages -->       

     </ul> 
+0

是的,這是可能的。然而,在計算器上,你應該詢問你遇到的問題,而不是要求別人爲你完成工作。這被認爲是非常粗魯的。請更新問題以說明您需要用「HMENU」和「TMENU」創建此菜單的問題。 – pgampe

+0

文檔對您有幫助嗎? –

回答

0

這是可能的,請閱讀非常詳細的manual here

lib.textmenu = HMENU lib.textmenu { 

    # We define the first level as text menu. 
    1 = TMENU 

    # We define the normal state ("NO"). 
    1.NO = 1 
    1.NO.allWrap = <li>|</li> 

    # We define the active state ("ACT"). 
    1.ACT = 1 
    1.ACT.wrapItemAndSub = <li>|</li> 

    # Wrap the whole first level. 
    1.wrap = <ul class="level1">|</ul> 

    # The second and third level should be configured exactly 
    # the same way. 
    # In between the curly brackets, objects can be copied. 
    # With the dot "." we define that the object can be found 
    # in the brackets. 
    # With 2.wrap and 3.wrap we overwrite the wrap, which was 
    # copied from 1.wrap. 
    2 < .1 
    2.wrap = <ul class="level2">|</ul> 
    3 < .1 
    3.wrap = <ul class="level3">|</ul> 
} 

如果你已經知道Typo腳本,那麼這裏是引用:HMENUTMENUTMENUITEM