我有一個HTML模板,我使用automaketemplate製作了一個typo3模板。在該HTML,我的div這樣如果內部UL沒有值,則不顯示外部div div
<div class="bigPostItWrap">1
<div class="postit">2
<div class="postit_tesa">3</div>
<div class="postItWrap">4
<ul class="menusmall">5
<li>* Team</li>6
<li>* something else</li>
<li>* Third point</li>
</ul>
</div>
</div>
</div>
的UL的設置應包含第二個功能,僅當選擇特定主導航對象顯示。由於它位於其他地方在屏幕上,我做了一個獨立的菜單這樣
postitMenu = HMENU
postitMenu {
# show the submenue relative to this entry level (?)
entryLevel = 1
# the first level of the menu is a text menu
1 = TMENU
# wrap the whole menu with <ul class="menu"> | </ul>
1.wrap = <ul class="menusmall"> | </ul>
# enable the "no"rmal state
1.NO = 1
# for the normal state, wrap it in li
1.NO.linkWrap = <li>* |</li>
#enable active state
1.ACT = 1
#copy all properties from normal state to active state
1.ACT < .NO
# disable the link for the active menu-point
1.ACT.doNotLinkIt = 1
# wrap the active menulink in li with the class = "active"
1.ACT.allWrap = <li class="active">* |</li>
}
這一切都工作得很好,菜單隻被顯示在正確的主菜單項。但外部的div postit
包含一個背景圖片(你可能猜到,它是一個postIt),postit_tesa在郵件的頂部顯示一條膠帶。當然,如果我不顯示次要菜單,我也不希望postIt和膠帶被渲染。
由於我對typoScript相當陌生,我不知道如何實現這一點。我不知道如何谷歌,至少我沒有找到任何解決方案。我認爲,在某種程度上,如果我做了bigPostItWrap圍繞它,我可以做這樣的事情
if there is an li-element,
render the subpart bigPostItWrap,
else, don't render it
但II不能TS-IF,或做一些完全以錯誤的。任何暗示表示讚賞後面得到。這可能是一個親可笑容易,但我無法弄清楚,我試圖從前天起.-
謝謝!