Hallo,
ich habe in meinem Layout folgende Code-Passage:
<div class="sidebar">
<f:render partial="sub_nav.html" />
</div>
sub_nav.html:
<div class="widget">
<f:cObject typoscriptObjectPath="lib.sub_nav" />
</div>
Ich würde gerne "<f:render partial="sub_nav.html" />" in eine IF-Abfrage stecken, da es nur angezeigt werden soll, wenn "<f:cObject typoscriptObjectPath="lib.sub_nav" />" nicht leer ist.
Wie mache ich das? (bin noch Fluid-Anfänger)
Damit möchte ich bezwecken, das die Sub-Navigation nur da angezeigt wird, wo auch Unterseiten vorhanden sind.
Mit freundlichen Grüßen
Pionier
Keiner eine Idee?
Hier mal das TS mit dem ich die Sub-Nav erzeuge:
# Sub-Nav
lib.sub_nav = HMENU
lib.sub_nav {
entryLevel = 1
1 = TMENU
1 {
wrap = <ul class="nav bs-sidenav">|</ul>
NO.allWrap = <li>|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
ACT.ATagTitle.field = abstract // description // title
}
2 = TMENU
2 {
NO.allWrap = <li>|</li>
NO.ATagTitle.field = abstract // description // title
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
ACT.ATagTitle.field = abstract // description // title
wrap = <ul class="nav">|</ul>
}
}
Verstehe das Problem nicht. Wenn keine Unterseiten da sind, kommt aus dem HMENU doch eh nichts raus und alles ist gut. MIt CSS kannst du dafür sorgen, dass das Container Div keine Höhe hat, wenn nichts drin ist.