TYPO3 menu Content Element Layout

From snippet wiki
Jump to navigation Jump to search

To use special adaptions of the builtin menu element, select a Content Element Layout different from default. You can rename the offered selection in the root page TSConfig:

TCEFORM.tt_content.layout.altLabels.2 = MySpecialFormat

and use that marker in the template system:

tt_content.menu.20.1.stdWrap.outerWrap = <ul class="csc-menu csc-menu-1 layout{field:layout}">|</ul>
tt_content.menu.20.1.stdWrap.insertData = 1

Now you get an extra class like layout0 for default, layout2 for the example above. So you can style that different:

ul.csc-menu.layout2 {
  color: #f00;
}