0

In a installation of Typo3 7.6, I have a simple gridelement, just providing two columns.

When adding a gridelement in the backend, I can set appearence -> layout to one of several values.

The configuration of gridelements via typoscript adds its values to tt_content.gridelements_pi1.20.10.setup

Is there a possibility to add a class to the typoscript-setup, depending on the value in "layout"?

yogi
  • 67
  • 6

1 Answers1

0

Since the value belongs to the grid container itself, there is no special magic necessary to get it from the record. A simple dataWrap should do the job.

tt_content.gridelements_pi1.20.10.setup {    
  1 < lib.gridelements.defaultGridSetup
  1 {
    dataWrap = <div class="layout-number-{field:layout}">|</div>
    columns {
      ...
    }
  }
}
Jo Hasenau
  • 2,526
  • 1
  • 14
  • 16