---
title: How to implement complex page layouts and substructures in TYPO3
url: "https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-two"
description: How to add complex page layout substructures using the TYPO3 Container Extension. Part 3 of our series.
image: "https://b13.com/fileadmin/_processed_/a/4/csm_Container_pt3_191-1_5bc20680fb.png"
date: 2020-07-21
modified: 2026-08-19
lastUpdated: 2026-08-19
---

# How to implement complex page layouts and substructures in TYPO3

[ Container ](https://b13.com/knowledge/container) [ CType ](https://b13.com/knowledge/ctype) [ TYPO3 ](https://b13.com/knowledge/typo3)

 Flexible Containers and Grids for TYPO3, Part Three
=====================================================

![](https://b13.com/fileadmin/_processed_/a/d/csm_david_5ce18d41e2.jpg)David Steeb

  22 July 2020

 [ RSS Feed ](https://b13.com/rss.xml)

  ![Two individuals, one with long hair and the other with short hair, are pointing at a large digital screen displaying text and graphics. The scene features vibrant colors and abstract shapes in the background.](https://b13.com/fileadmin/_processed_/c/9/csm_Container_pt3_04be350333.webp)

**Advanced example: How to add complex substructures to a page.** In [Part 1 of this series](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3), we introduced you to our Container extension (and when not to use it!). We talked about why we created it and how you can add simple container elements for structuring content. In [Part 2](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-two), we took you through a quick example: adding a simple 2-column substructure to a page and saving content elements into it.

In this third post, I want to show you some advanced use cases, how container elements help us create a clean and intuitive backend experience for editors, and why we love the “core-near” way container elements are created by our extension (hint: cleaner code and smoother, less risky upgrades).

  ####  This post is part of our Container Series

- [Part 1: Flexible Containers and Grids for TYPO3](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3)
- [Part 2: Flexible Containers and Grids for TYPO3—Basic Example](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-two)
- **[Part 3: Flexible Containers and Grids for TYPO3—Advanced Example](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-three)**

   Advanced Container Configuration Use-Case
-------------------------------------------

The need for subsections of a page being displayed in a two-column layout is an obvious use-case for any multi-column-extension. In the projects we tackle at b13, we encounter some complex “element combination block” requirements in the frontend. Our designers also seem to have a knack for challenging us and pushing the edge of the envelope. As TYPO3 integrators, we strive to create flexible backend and content element structures. We want to allow for all the potential desired combinations of content types that we (or our designers) want to see while keeping the available options and layouts to a minimum. We have seen too much flexibility lead to editors being able to (unintentionally) break the design, especially with large teams working in a TYPO3 backend. We try to make the editors‘ choices as clear and robust as possible.

**For this example, let us assume we are building an online corporate design manual.**

- The design manual will have pages for various different design elements, colors, buttons, fonts, paragraphs, etc.
- Each page may consist of multiple (sub) sections with detailed descriptions and guidelines, as well as featuring examples.
- Each page section may have a headline, a general description text, cross-reference links, related downloads, and the content itself, which can consist of various elements and content types.

**So by definition, we have**

- Some page areas that can only be filled once by an editor (each element should only have one headline, one description text, and one set of links, for example).
- And other areas where the editor might need to add several other content elements.

**Any given page in the corporate design manual** can have multiple sections (product teasers, news teasers, event teasers, contact teasers, etc.) with a mix of content types.

For this example design, shown below, we are talking about a page template divided into sections, each representing substructures. Each section can have a headline, an introduction text, various content elements in the main column, and more optional content in a sidebar-column.

If we only had a single structure like this, we would start with a regular backend layout. Since this structure is a content block that can be placed (and customized) on the same page multiple times, we create a container element. Using a container, we have an element with a unique uid, letting us use TYPO3’s in-page section-links to create in-page menus or links across pages to the specific anchor in question.

  Here’s a design screenshot that shows what we’re aiming for:

  ![Corporate Design Manual](https://b13.com/fileadmin/_processed_/8/8/csm_corporate-design-manual-webdesign-mockup_106c02e00c.webp "Corporate Design Manual")  Figure 1: Corporate Design Manual Page Layout

   Configure the Container Element
---------------------------------

Here’s the TCA for our example container element:

  ```
1<br></br>2<br></br>3<br></br>4<br></br>5<br></br>6<br></br>7<br></br>8<br></br>9<br></br>10<br></br>11<br></br>12<br></br>13<br></br>14<br></br>15<br></br>16<br></br>17<br></br>18<br></br>19<br></br>20<br></br>21<br></br>22<br></br>23<br></br>24<br></br>25<br></br>26<br></br>27<br></br>28<br></br>29<br></br>30<br></br>31<br></br>32<br></br>33<br></br>34<br></br>35<br></br>36<br></br>37<br></br>38<br></br>39<br></br>40<br></br>41<br></br>42<br></br>
```

```
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\b13\Container\Tca\Registry::class)->configureContainer(<br></br>    (<br></br>        <span class="hljs-keyword">new</span> \b13\Container\Tca\ContainerConfiguration(<br></br>            <span class="hljs-string">'cd-detail-section'</span>, <br></br>            <span class="hljs-string">'CD Detail Section'</span>,<br></br>            <span class="hljs-string">'Insert a detail section for Corporate Design Elements'</span>,<br></br>            [<br></br>                [<br></br>                    [<span class="hljs-string">'name'</span> => <span class="hljs-string">'Main Column'</span>, <span class="hljs-string">'colPos'</span> => <span class="hljs-number">201</span>, <span class="hljs-string">'allowed'</span> => [<span class="hljs-string">'CType'</span> => <span class="hljs-string">'textmedia,cta,text,image,bullets,cd_text,footnotes'</span>]],<br></br>                    [<span class="hljs-string">'name'</span> => <span class="hljs-string">'Sidebar Content'</span>, <span class="hljs-string">'colPos'</span> => <span class="hljs-number">202</span>, <span class="hljs-string">'allowed'</span> => [<span class="hljs-string">'CType'</span> => <span class="hljs-string">'text,sidebar-image'</span>]]<br></br>                ]<br></br>            ]<br></br>        )<br></br>    )<br></br>    ->setIcon(<span class="hljs-string">'EXT:site_cdmanual/Resources/Public/Icons/CD-Detail-Section.svg'</span>)<br></br>    ->setBackendTemplate(<span class="hljs-string">'EXT:site_cdmanual/Resources/Private/Container/Templates/Cd-detail-section.html'</span>)<br></br>);<br></br><br></br>$GLOBALS[<span class="hljs-string">'TCA'</span>][<span class="hljs-string">'tt_content'</span>][<span class="hljs-string">'types'</span>][<span class="hljs-string">'cd-detail-section'</span>][<span class="hljs-string">'showitem'</span>] = <span class="hljs-string">'<br></br>    --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,<br></br>        --palette--;;general,<br></br>        --palette--;;headers,               <br></br>        bodytext;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:bodytext_formlabel,<br></br>    --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,<br></br>        --palette--;;frames,<br></br>        --palette--;;appearanceLinks,<br></br>    --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,<br></br>        --palette--;;language,<br></br>    --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,<br></br>        --palette--;;hidden,<br></br>        --palette--;;access,<br></br>    --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,<br></br>        categories,<br></br>    --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,<br></br>        rowDescription,<br></br>    --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,<br></br>'</span>;<br></br><br></br>$GLOBALS[<span class="hljs-string">'TCA'</span>][<span class="hljs-string">'tt_content'</span>][<span class="hljs-string">'types'</span>][<span class="hljs-string">'cd-detail-section'</span>][<span class="hljs-string">'columnsOverrides'</span>][<span class="hljs-string">'bodytext'</span>][<span class="hljs-string">'config'</span>] = [<br></br>    <span class="hljs-string">'rows'</span> => <span class="hljs-number">5</span>,<br></br>    <span class="hljs-string">'enableRichtext'</span> => <span class="hljs-keyword">true</span>,<br></br>];<br></br>
```

  Comparing this to [what we did in Part 2 with the simple 2-column container](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-two), you will immediately notice two significant differences:

1. The container configuration object itself makes use of additional methods, including setting a backend Fluid Template and a CType icon.
2. We add a regular “showitem” configuration for the container CType.

We also use additional column configuration to restrict the types of elements allowed within a specific content area. You can only do this if you install Nicole Cordes’s [Content Defender Extension](https://github.com/IchHabRecht/content_defender). This handy extension is one of our house favorites at b13, and we use it in all of our projects.

   Add a “showitem” Container CType Configuration
------------------------------------------------

The container registration process sets a default configuration for a container element’s visible fields. Adding a “showitem” configuration to the content type’s TCA configuration allows us to add the fields we need to the container itself. In our example, we add the field header, a bodytext field for an introduction, and a layout field. We are working “core near,” with a standard CType for these containers, so we can add all the fields available in table `tt_content`.

    ![Backend form for editing our Container element](https://b13.com/fileadmin/_processed_/f/7/csm_backend-form-for-our-container-element_12c722f78a.webp "Backend form for editing our Container element")  Figure 3: Backend Form for our container element.

This example includes a complete set of fields. You do not need to add everything here to make this work, but you should include the language field if you’re working on a multi-language website and the “general” palette, which contains the “CType” and “colPos” fields.

   Create the Backend Preview
----------------------------

Setting a custom backend Fluid template enables us to define our own backend layout for the Page Module. With it, we can show editors the container content areas, and the other available fields in our container element. Our custom Fluid template also lets us format these element previews freely.

Here’s a sample Fluid template for the element we just added:

  ```
1<br></br>2<br></br>3<br></br>4<br></br>5<br></br>6<br></br>7<br></br>
```

```
<span class="xml"><span class="hljs-tag"><<span class="hljs-name">html</span> <span class="hljs-attr">data-namespace-typo3-fluid</span>=<span class="hljs-string">"true"</span>></span><br></br><span class="hljs-tag"><<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{editLink.url -> f:format.raw()}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"</span></span></span><span class="hljs-template-variable">{editLink.title}</span><span class="xml"><span class="hljs-tag"><span class="hljs-string">"</span>></span><br></br>	</span><span class="hljs-template-variable">{bodytext -> f:format.nl2br() -> f:format.stripTags()}</span><span class="xml"><br></br><span class="hljs-tag"></<span class="hljs-name">a</span>></span><br></br></span><span class="hljs-template-variable">{tx_container_grid -> f:format.raw()}</span><span class="xml"><br></br><span class="hljs-tag"></<span class="hljs-name">html</span>></span><br></br></span><br></br>
```

  This means that the Fluid template used to render the backend preview of our container element can access all the standard fields in the `tt_content` database record. Our Container extension adds one more variable, called `tx_container_grid`. This variable holds the container grid (in this case, including the two columns defined in the container setup) as a complete HTML block, together with all the child elements and options to create new elements. In this example, we add additional preview content (our bodytext field) to the overall element preview before rendering the container grid HTML.

Here’s how editors see our container element in the TYPO3 backend Page Module:

  ![Container Backend preview](https://b13.com/fileadmin/_processed_/d/8/csm_backend-element-preview-container-typo3_69f2dabc2e.webp "Container Backend preview")  Figure 5: Element preview for our container with custom backend template

   Potential Further Configuration
---------------------------------

There are additional methods you can use when registering a container:

- `setGridTemplate` to use a custom Grid Fluid Template
- `setSaveAndCloseInNewContentElementWizard` to set the “saveAndClose” option for the New Content Element Wizard for TYPO3 v10+ (default: `true`)
- `setRegisterInNewContentElementWizard` to set automatic element-registration in the New Content Element Wizard (default: `true`)
- `setGroup` to add your container element to a specifc CType group and move it to specific tab in the New Content Element Wizard (default: `container`)

  ###  Grid Fluid Template

The default Grid Template for a container’s backend page module preview works similarly to how backend layouts are processed: It divides the element area into rows and columns based on the configuration set during registration in the TCA. You can expect this to work for most of your elements—as you’ve seen in our example above, you can combine content from other fields with a container grid view in the backend element preview. Still, there will be that unique scenario every now and then where the default layout is not ideal. You might want to add some CSS to change the editor’s preview based on the screen size, or you have a complex element that combines “regular” `tt_content` field values with specific content areas of your container.

This is where the seventh parameter comes in: You can set your own grid template for such cases to change the default grid layout. The default template can be found in `EXT:container/Resources/Private/Templates/Grid.html`. This simple template (it iterates over rows and columns) generates the output for the backend grid view.

You can change the grid template any way you want, like, for example, adding a text to one of the columns like this:

  ![Custom Backend element preview for Container](https://b13.com/fileadmin/_processed_/3/b/csm_advanced-backend-preview-container-typo3_f4f080d60f.webp "Custom Backend element preview for Container")  Figure 6: Custom Backend Grid Template

  ###  Disable the Save and Close option

The Container extension makes use of the new “saveAndClose” argument in the TYPO3 v10 for the New Content Element Wizard (see item 13 in [13 Little Things We Love in TYPO3 v10](https://b13.com/knowledge/13-little-things-we-love-about-typo3-v10#c886) to learn more about this little gem). By default, it is set to “true.” When adding a new container, you can disable the “saveAndClose” setting by using the `setSaveAndCloseInNewContentElementWizard` method.

  ###  Disable Automatic Inclusion in the New Content Element Wizard

Every container element you create will be added to the New Content Element Wizard automatically, using the configuration details provided in the TCA registration. In case you want to modify this behaviour—e.g., to move a container item to another tab in the wizard, reorder the items within the tab, or for some other reason—use the method `setRegisterInNewContentElementWizard` to disable this beviour. The container won’t be added to the New Content Element Wizard automatically, but you can add it yourself in your PageTSConfig configuration.

   Move a Container Element into Another Group
---------------------------------------------

By default, all container elements you create will be listed in a tab (and a corresponding CType group) called “container.” If you want to change that for a specific element, use the method `setGroup` to move the element into another group and tab.

   Want More? Want to Get Involved?
----------------------------------

In the three parts of this series about Flexible Containers and Grids for TYPO3, we introduced the basic concepts around layout “containers” for TYPO3, when you might need more than core offers by default, how our Container extension provides a clean “core-near” solution and provided simple and more complex examples of implementing Container in your projects. Now that you’ve read them all, go and try it out for yourself!

And what if you’ve found a bug in Container? (Gasp!) Or need a missing feature? Did we forget something else? Get in touch! [Head on over to GitHub](https://github.com/b13/container), open an issue and create a pull request!

Thanks in advance for your critical eye and your contributions. It all helps us make our favorite open source project better for everyone.

  ###  Written by:

 ![Bild von David Steeb](https://b13.com/fileadmin/_processed_/a/d/csm_david_cf042ebb7f.webp)

b13 Founder and CEO, David, is someone you’ll meet if you’re thinking about working with our agency. He is constantly learning new skills and is an influential part of our cutting-edge frontend practice.

 David Steeb  CEO

 [ more from David Steeb ](https://b13.com/team/david-steeb)

  Related Articles
------------------

- ![Cartoon trophy character surrounded by hands giving thumbs up and a heart gesture, set against a gear-patterned background.](https://b13.com/fileadmin/_processed_/f/7/csm_T3ppy_Design_Kit_Headerbild_b51eb9dc31.webp)

    ###  T3ppy Gives TYPO3 a Friendly Face

     06 August 2026 | Florian “Flix” Keitgen

     TYPO3 is powerful—but it doesn’t have to feel impersonal. Meet T3ppy, our friendly companion for the backend.

     [ Read more: T3ppy Gives TYPO3 a Friendly Face ](https://b13.com/knowledge/t3ppy-design-kit)
- ![Gavel labeled "AI" on a circuit-patterned background with yellow stars, symbolizing regulation or legislation related to artificial intelligence in the EU.](https://b13.com/fileadmin/_processed_/1/0/csm_EUAIAct_Headerbild_510724b3de.webp)

    ###  AI Content in TYPO3: Labelling Needs Accountability

     02 August 2026 | Benni Mack

     The EU AI Act brings the origins of AI-generated content into focus. AI Label marks AI-generated and AI-edited content in TYPO3 and records who signed off the published version—for…

     [ Read more: AI Content in TYPO3: Labelling Needs Accountability ](https://b13.com/knowledge/ai-content-in-typo3-labelling-needs-accountability)
- ![A series of stylized figures in various poses, each with a distinctive orange hat, depict a progression from walking to standing still while looking at a phone, set against a purple grid background.](https://b13.com/fileadmin/_processed_/d/7/csm_QueuesDDEV_Headerbild_f640931350.webp)

    ###  Better scalability with decoupled queues: How to set up RabbitMQ with TYPO3

     10 April 2024 | Jochen Roth

     When built-in message transports hit their limits, RabbitMQ can provide TYPO3 with a scalable, robust message queue.

     [ Read more: Better scalability with decoupled queues: How to set up RabbitMQ with TYPO3 ](https://b13.com/knowledge/better-scalability-with-decoupled-queues-how-to-set-up-rabbitmq-with-typo3)
- ![A cartoon character resembling a shield gives a thumbs up in front of a computer interface with various menu options.](https://b13.com/fileadmin/_processed_/e/6/csm_Header_cda1f80173.webp)

    ###  Meet T3ppy: A New Era for Editorial Work in TYPO3

     01 April 2026 | Florian “Flix” Keitgen

     T3ppy and the AiM extension bring AI directly into the TYPO3 backend—enhancing SEO, content quality, and workflows with centralized control.

     [ Read more: Meet T3ppy: A New Era for Editorial Work in TYPO3 ](https://b13.com/knowledge/meet-t3ppy-a-new-era-for-editorial-work-in-typo3)
- ![Retro microphone illustration with a shopping cart icon in the background, symbolizing e-commerce or online shopping.](https://b13.com/fileadmin/_processed_/f/8/csm_Marketplace_Headerbild_ee1575614c.webp)

    ###  Why TYPO3 Needs a Marketplace for Products

     25 March 2026 | Florian “Flix” Keitgen

     A marketplace would make TYPO3 products more discoverable, easier to compare, and benefit both agencies and clients alike.

     [ Read more: Why TYPO3 Needs a Marketplace for Products ](https://b13.com/knowledge/why-typo3-needs-a-marketplace-for-products)
- ![A hand holding a magnifying glass over a laptop screen displaying a webpage with an image and text elements.](https://b13.com/fileadmin/_processed_/e/5/csm_BackendUserSection_Headerbild_6093c842fd.webp)

    ###  Unlocking TYPO3’s Hidden Gem: The Backend User Section (Doktype 6)

     05 March 2026 | David Steeb

     Discover TYPO3’s underrated doktype 6 (Backend User Section) for secure internal previews, editor training, and prototyping. Learn real use cases, common pitfalls like 403 errors…

     [ Read more: Unlocking TYPO3’s Hidden Gem: The Backend User Section (Doktype 6) ](https://b13.com/knowledge/backend-user-section-in-typo3-uses-pitfalls-helper)
- ![Two stylized web page designs featuring a user profile, image placeholders, and text sections, set against a light blue background.](https://b13.com/fileadmin/_processed_/2/0/csm_BackendPreview_Headerbild_b4c5799cfa.webp)

    ###  Backend Previews With a System—Why We Built EXT:backendpreviews

     09 February 2026 | David Steeb

     EXT:backendpreviews brings structure and consistency to content previews in the TYPO3 backend using Fluid templates, layouts, and partials.

     [ Read more: Backend Previews With a System—Why We Built EXT:backendpreviews ](https://b13.com/knowledge/backend-previews-with-a-system-why-we-built-extbackendpreviews)
- ![A human hand shakes a robotic hand against a purple background with heart patterns, symbolizing collaboration between humans and technology.](https://b13.com/fileadmin/_processed_/6/2/csm_AIbotsLoveMarkdown_Headerbild_72fe5820d6.webp)

    ###  The Internet Is No Longer Just for Humans—AI Bots Love Markdown

     28 January 2026 | Benni Mack

     Discover why most web traffic is now automated and how TYPO3’s structured content model prepares websites for humans, editors, and AI systems.

     [ Read more: The Internet Is No Longer Just for Humans—AI Bots Love Markdown ](https://b13.com/knowledge/the-internet-is-no-longer-just-for-humans-ai-bots-love-markdown)
- ![Several colorful web page mockups stacked together, showcasing different layouts and design elements against a purple background.](https://b13.com/fileadmin/_processed_/e/3/csm_CaminoTheme_Headerbild_d082598009.webp)

    ###  Camino—The Need for a Default Theme in TYPO3 Is Real

     27 January 2026 | Benni Mack

     With TYPO3 v14, Camino introduces a default theme that removes friction from first installs. Why this matters—and how TYPO3 laid the groundwork.

     [ Read more: Camino—The Need for a Default Theme in TYPO3 Is Real ](https://b13.com/core-insights/blog/camino-the-need-for-a-default-theme-in-typo3-is-real)
- ![Graphic featuring stylized representations of a tower with the text "T3CON25 Düsseldorf" prominently displayed in the center.](https://b13.com/fileadmin/_processed_/7/b/csm_T3CON2025_Headerbild_fc9c5cc53e.webp)

    ###  T3CON25—One Step Closer to the Future of Content Management

     10 December 2025 | Franzi Töpler

     T3CON25 showcased the future of TYPO3 with insights on TYPO3 v14, AI, digital sovereignty, and open-source solutions driving secure, modern web experiences.

     [ Read more: T3CON25—One Step Closer to the Future of Content Management ](https://b13.com/knowledge/shaping-the-future-of-content-management-t3con25)