automaketemplateを使用してtypo3テンプレートを作成したHTMLテンプレートがあります。この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
しかし、IIはts-ifを後回しにすることはできません。または、まったく間違ったことをすることもできません。ヒントをいただければ幸いです。プロにとってはばかばかしいほど簡単なことかもしれませんが、理解できず、昨日から頑張っています-.-
ありがとう!