我有一个 HTML 模板,我使用 automaketemplate 制作了一个typo3 模板。在这个 HTML 中,我有一个这样的 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>
}
所有这一切都很好,菜单只显示在正确的主菜单条目上。但是外部 divpostit
包含一个背景图像(您可能会猜到,它是一个 postIt),而 postit_tesa 在 postit 顶部显示一条胶带。当然,如果我不显示二级菜单,我也不想渲染 postIt 和胶带。
由于我对typoScript 还很陌生,所以我不知道如何实现这一点。而且我不知道如何用谷歌搜索,至少我没有找到任何解决方案。我想,如果我围绕它制作 bigPostItWrap,我可能会做类似的事情
if there is an li-element,
render the subpart bigPostItWrap,
else, don't render it
但我不能落后于 ts-if,或者做一些完全错误的事情。任何提示都值得赞赏。对于专业人士来说这可能是荒谬的容易,但我无法弄清楚,我从前天开始尝试 -.-
谢谢!