2014-04-03 95 views
0

我有一個聯繫人彈出窗口,當用戶點擊一個側面按鈕時顯示。 該圖層應該在右下角有一個鏈接,爲此,我想使用tt_content中的header_link字段。但我不想連接標題也。Typoscript - 顯示無標題內容

那麼,我怎樣才能得到一個沒有標題的內容?

lib.contactLayer = COA 
lib.contactLayer { 
    10 = TEXT 
    10.value = <a id="contactHandle" href="#"></a> 

    20 = COA 
    20 { 
     10 = CONTENT 
     10 { 
      table = tt_content 
      select { 
       pidInList = {$storageFolder.records} 
       uidInList = {$record.contactLayer} 
       orderBy = sorting 
      } 
     } 

     20 = TEXT 
     20.value = <a href="#" id="contactLayerClose"></a> 

     30 = CONTENT 
     30 { 
      table = tt_content 
      select { 
       pidInList = {$storageFolder.records} 
       uidInList = {$record.contactLayer} 
       orderBy = sorting 
      } 

      renderObj = COA 
      renderObj { 
       10 = TEXT 
       10 { 
        value = Kontakt aufnehmen 
        stdWrap.typolink { 
         parameter.field = header_link 
         wrap (
          <span id="contactLayerLinkText">|</span> 
          <span class="icon"></span> 
         ) 
         ATagBeforeWrap = 1 
         ATagParams = id="contactLayerLink" class="clearfix" 
        } 
       } 
      } 
     } 

     wrap = <section id="contactLayer">|</section> 
    } 
} 

編輯:我的方法是從一開始就錯了,因爲我正在2個SQL查詢。這是一個我結束了,使用一個內容和renderObj:

lib.contactLayer = COA 
lib.contactLayer { 
    10 = TEXT 
    10.value = <a id="contactHandle" href="#"></a> 

    20 = COA 
    20 { 
     10 = CONTENT 
     10 { 
      table = tt_content 
      select { 
       pidInList = {$storageFolder.records} 
       uidInList = {$record.contactLayer} 
       orderBy = sorting 
      } 

      renderObj = COA 
      renderObj { 

       10 = TEXT 
       10.value = <a href="#" id="contactLayerClose"></a> 

       20 = FILES 
       20 { 
        references { 
         table = tt_content 
         uid.field = uid 
         fieldName = image 
        } 
        renderObj = IMAGE 
        renderObj { 
         file.import.data = file:current:publicUrl 
        } 
       } 

       30 = COA 
       30 { 
        10 = TEXT 
        10.field = header 
        10.wrap = <h1>|</h1> 

        20 = TEXT 
        20.field = subheader 
        20.wrap = <h2>|</h2> 

        30 = TEXT 
        30.field = bodytext 

        wrap = <div class="text">|</div> 
       } 

       40 = TEXT 
       40 { 
        value = Kontakt aufnehmen 
        stdWrap.typolink { 
         parameter.field = header_link 
         wrap (
          <span id="contactLayerLinkText">|</span> 
          <span class="icon"></span> 
         ) 
         ATagBeforeWrap = 1 
         ATagParams = id="contactLayerLink" class="clearfix" 
        } 
       } 
      } 
     } 

     wrap = <section id="contactLayer">|</section> 
    } 
} 
+0

你寧願添加您的工作版本的答案,並接受它作爲社區維基所以這不會再彈出的未解問題。 – lorenz

+0

完成,謝謝你的提示:) – cili

回答

0

我的方法是從一開始就錯了,因爲我正在2個SQL查詢。這是一個我結束了,使用一個內容和renderObj:

lib.contactLayer = COA 
lib.contactLayer { 
    10 = TEXT 
    10.value = <a id="contactHandle" href="#"></a> 

    20 = COA 
    20 { 
     10 = CONTENT 
     10 { 
      table = tt_content 
      select { 
       pidInList = {$storageFolder.records} 
       uidInList = {$record.contactLayer} 
       orderBy = sorting 
      } 

      renderObj = COA 
      renderObj { 

       10 = TEXT 
       10.value = <a href="#" id="contactLayerClose"></a> 

       20 = FILES 
       20 { 
        references { 
         table = tt_content 
         uid.field = uid 
         fieldName = image 
        } 
        renderObj = IMAGE 
        renderObj { 
         file.import.data = file:current:publicUrl 
        } 
       } 

       30 = COA 
       30 { 
        10 = TEXT 
        10.field = header 
        10.wrap = <h1>|</h1> 

        20 = TEXT 
        20.field = subheader 
        20.wrap = <h2>|</h2> 

        30 = TEXT 
        30.field = bodytext 

        wrap = <div class="text">|</div> 
       } 

       40 = TEXT 
       40 { 
        value = Kontakt aufnehmen 
        stdWrap.typolink { 
         parameter.field = header_link 
         wrap (
          <span id="contactLayerLinkText">|</span> 
          <span class="icon"></span> 
         ) 
         ATagBeforeWrap = 1 
         ATagParams = id="contactLayerLink" class="clearfix" 
        } 
       } 
      } 
     } 

     wrap = <section id="contactLayer">|</section> 
    } 
}