0

At the moment I am using this TS to prepare my content from a grid element (https://typo3.org/extensions/repository/view/gridelements):

tt_content.gridelements_pi1.20.10.setup {
  1 < lib.gridelements.defaultGridSetup
  1 {
    columns {
      10 < .default
      10.wrap = <div class="gefa">|</div>

      11 < .default
      11.wrap = <div class="gefa2">|</div>

      12 < .default
      12.wrap = <div class="gefa3">|</div>

      13 < .default
      13.wrap = <div class="gefa4">|</div>
    }
  }
}

Now I want to make a html template (fluid) with placeholders for my content from the grid element. How to do this?

rakete
  • 2,953
  • 11
  • 54
  • 108
  • https://stackoverflow.com/questions/37244308/how-to-realize-one-page-template-in-typo3-with-custom-elements-for-sections/37247567#37247567 , this could help you – Andrei Todorut May 28 '17 at 08:01

2 Answers2

3

You can define the rendering like a cObject.

tt_content.gridelements_pi1.20.10.setup {
    1 < lib.gridelements.defaultGridSetup
    1 {
        cObject = FLUIDTEMPLATE
        cObject {
            file = path/to/your/fluid/template.html
        }
    }
}

in your fluid tempalte you can use the columns like this:

    <div class="gefa">
        <f:format.raw>
            {data.tx_gridelements_view_column_10}
        </f:format.raw>
    </div>
    <div class="gefa2">
        <f:format.raw>
            {data.tx_gridelements_view_column_11}
        </f:format.raw>
    </div>
András Ottó
  • 7,605
  • 1
  • 28
  • 38
3

What TYPO3 Version do you use? On version 8.7.x I simply use these lines:

lib.gridelements.defaultGridSetup.cObject =<  lib.contentElement

tt_content.gridelements_pi1.20.10.setup.{
  mycontent < lib.gridelements.defaultGridSetup
  mycontent.cObject.templateName = MyTemplate
}