typoscript - Typo3 HMENU in Partials not showing -
i trying create header in partials folder, doesn't showed if trying insert template.
my setup.ts file looks follow:
page = page page { 200 = fluidtemplate 200 { file = fileadmin/private/templates/home/template.html partialrootpath = fileadmin/private/partials layoutrootpath = fileadmin/private/layouts/home ....
in layout.html file try include header partial section "test" follows:
<div> <f:render partial='header' section='test' /> </div>
the header partial file written below:
<f:section name="test"> <ul class="flexnav" data-breakpoint="800"> <f:cobject typoscriptobjectpath="lib.navbar" /> </ul>
the "lib.navbar" declared in object.ts file:
lib.navbar = hmenu lib.navbar { entrylevel = 1 1 = tmenu 1 { wrap = <ul class="test1"> | </ul> no = 1 expall = 1 no { wrapitemandsub = <li> | </li> stdwrap.htmlspecialchars = 1 atagtitle.field = title } act <.no act { wrapitemandsub = <li class="active"> | </li> } } 2 = tmenu 2 { expall = 1 wrap = <ul> | </ul> no { wrapitemandsub = <li> | </li> } }
my problem now, cannot use variable lib.navbar in templates. empty. know doing wrong here?
you can either use partial
or section
attribute in <f:render />
.
try use: <f:render partial="header" />
, remove section in partial.
Comments
Post a Comment