我有一个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,或做一些完全以错误的。任何暗示表示赞赏后面得到。这可能是一个亲可笑容易,但我无法弄清楚,我试图从前天起.-
谢谢!