---
title: How to implement a simple 2-column layout container in TYPO3
url: "https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-two"
description: "How to: Extend TYPO3’s built-in layouts with a simple 2-column element using the Container Extension. Part 2 of our series."
image: "https://b13.com/fileadmin/_processed_/a/5/csm_Container_pt2_191-1_b242fca832.png"
date: 2020-07-20
modified: 2026-08-19
---

# How to implement a simple 2-column layout container 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 Two
===================================================

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

  20 July 2020

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

  ![A person with curly hair stands in front of a large computer screen displaying text and graphics, while two smaller documents are positioned nearby. The overall color scheme features shades of blue and orange.](https://b13.com/fileadmin/_processed_/b/3/csm_Container_pt2_ac21aca780.webp)

**A simple example: How to Add a Two-Column Grid as a Flexible Content Element.**
 I will show you a simple example to help you get started with the TYPO3 Container extension: How to add a two-column container element. With it, your editors can easily add a page section that splits that part of the content area into two columns. In our next post, I will cover a more complex example.

In Part 1 of this series, [Flexible Containers and Grids for TYPO3](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3), we introduced the basic concepts around layout “containers” for TYPO3. We explained how many projects end up needing more layout flexibility than TYPO3 offers out-of-the-box, how many existing solutions came with the tradeoff of added complexity, cause difficulties when upgrading, and that b13’s new [Container](https://extensions.typo3.org/extension/container/) extension is here to help us with all of this! Our extension allows the addition of layout “containers” to content areas that can contain modules and elements as optional variations to the main layout while following TYPO3 core best practices, keeping your site flexible, maintainable, and easy to upgrade.

  ####  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)

   Get Started: Install Container
--------------------------------

To get started, you’ll need to have b13’s Container extension installed—if not, go get it using Composer:

`composer req b13/container`

   Configure a Two-Column Container
----------------------------------

To create a simple container element we need to do three things:

- Register our container element as a CType
- Add TypoScript configuration for our CType
- Add a Fluid Template for frontend output

  ###  Register our Container Element as a CType

To register our element we use the function “configureContainer” from our extension:

```
```
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>
```
```

```
```
\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">'2col-container'</span>, <br></br>            <span class="hljs-string">'2 Column Container'</span>,<br></br>            <span class="hljs-string">'Insert an element dividing the content area into two columns'</span>,<br></br>            [<br></br>                [<br></br>                    [<span class="hljs-string">'name'</span> => <span class="hljs-string">'Left Column'</span>, <span class="hljs-string">'colPos'</span> => <span class="hljs-number">201</span>],<br></br>                    [<span class="hljs-string">'name'</span> => <span class="hljs-string">'Right Column'</span>, <span class="hljs-string">'colPos'</span> => <span class="hljs-number">202</span>]<br></br>                ]<br></br>            ]<br></br>        )<br></br>    ) <br></br>);<br></br>
```
```

  Let’s look at the configuration steps in the code in detail

- we register our CType name (“2col-container”)
- we add a name for our CType
- we can add a description for our container element (used for the New Content Element Wizard)
- we add the backend layout configuration for displaying this container element in the backend—the array is identical to the one you would write out in the TypoScript array form for a backend layout. Note that we assign a “colPos” value to each container area.

  ###  A look at the backend

This simple configuration creates our 2-column content element. It adds a “Container” tab to the New Content Element Wizard and allows you to select the new “2 Column Container” element:

  ![New Content Element Wizard showing a two-column container element](https://b13.com/fileadmin/_processed_/4/f/csm_new-content-element-wizard-showing-two-column-container-element_e2aa3739f6.webp "New Content Element Wizard showing a two-column container element")  Figure 2: Our new container element is added to the New Content Element Wizard automatically

  All container elements are automatically added to this tab in the wizard by default. You can opt-out of this behavior for individual container elements if you need to. If you’re running TYPO3 v10, all automatically added container elements have the new “saveAndClose” option set to “true” (this, also, can be changed for each container—see Part 3 for details).

  Once you have saved the newly created element you will see a simple two-column element within your other page content, allowing you to add further content elements within the left and right columns:

  ![A web page layout displaying a test page titled "Container Test Page." It includes sections for English content, a greeting, and two columns labeled "Left Column" and "Right Column," each containing placeholder text and a link to GitHub.](https://b13.com/fileadmin/_processed_/6/f/csm_example-backend-view-with-container-element-in-typo3_c880c4c01a.webp "Example backend view with container element in TYPO3")  Figure 3: Example backend view of a page with our container element.

  ###  Add Frontend output

We need to add a TypoScript configuration for our element, as well as a Fluid Template for the frontend output of this container.

Add this configuration to your TypoScript setup:

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

```
```
tt_content.2col-container =<span class="hljs-tag">< <span class="hljs-attr">lib.contentElement</span><br></br><span class="hljs-attr">tt_content.2col-container</span> {<br></br>  <span class="hljs-attr">templateName</span> = <span class="hljs-string">2col-container</span><br></br>  <span class="hljs-attr">dataProcessing.13</span> = <span class="hljs-string">b13\Container\DataProcessing\ContainerProcessor</span><br></br>}</span><br></br>
```
```

  This snippet will invoke ContainerProcessor to process the child elements of each container area and make the content available for output in our Fluid Template. It also instructs TYPO3 to use a template called “2col-container” located in your template path for your content elements to render the frontend output (assuming your template root path is set in `lib.contentElement`).

  If you debug the Fluid template, you will see that it contains everything you need (and would expect) to work with it:

  ![Debug of container CType variables](https://b13.com/fileadmin/_processed_/6/3/csm_debug-of-container-ctype-variables_352b59760f.webp "Debug of container CType variables")  Figure 5: See the data you can work with in your container Fluid Template

  You have all the data from the content element itself (read: the container element) as well as two variables containing the data from the child records. Every child record holds the complete database record of the child content element, including an additional key called “renderedContent,” which is a representation of that content type’s rendered content (of course!). In most cases you can use that to output individual container child elements as needed.

  So, in our example, the Fluid frontend template would look something like this:

```
```
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>
```
```

```
```
<div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"b_multicolumn b_multicolumn--twocols"</span>><br></br>	<span class="xml"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"b_multicolumn__col"</span>></span><br></br>		<span class="hljs-tag"><<span class="hljs-name">f:for</span> <span class="hljs-attr">each</span>=<span class="hljs-string">"{children_201}"</span> <span class="hljs-attr">as</span>=<span class="hljs-string">"element"</span>></span><br></br>			{element.renderedContent -> f:format.raw()}<br></br>		<span class="hljs-tag"></<span class="hljs-name">f:for</span>></span><br></br>	<span class="hljs-tag"></<span class="hljs-name">div</span>></span></span><br></br>	<span class="xml"><span class="hljs-tag"><<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"b_multicolumn__col"</span>></span><br></br>		<span class="hljs-tag"><<span class="hljs-name">f:for</span> <span class="hljs-attr">each</span>=<span class="hljs-string">"{children_202}"</span> <span class="hljs-attr">as</span>=<span class="hljs-string">"element"</span>></span><br></br>			{element.renderedContent -> f:format.raw()}<br></br>		<span class="hljs-tag"></<span class="hljs-name">f:for</span>></span><br></br>	<span class="hljs-tag"></<span class="hljs-name">div</span>></span></span><br></br><<span class="hljs-regexp">/div></span><br></br>
```
```

  And with that, your two-column container element is ready to use.

   That was fun, what now?
-------------------------

In [Part 3 of this series](https://b13.com/knowledge/flexible-containers-and-grids-for-typo3-part-three) we will look at a more complex example.

   Considering Upgrading to TYPO3 v10?
-------------------------------------

Layout-relevant issues are just one of the areas you need to consider when planning an upgrade. We will be happy to help you analyze your projects for the whole gamut of upgradability challenges and opportunities.

 [ Read more about TYPO3 Upgrades ](https://b13.com/services/typo3-upgrade)

  ###  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
------------------

- ![A round table surrounded by chairs, with a shield featuring a keyhole in the center, flanked by two castle-like towers with flags.](https://b13.com/fileadmin/_processed_/a/b/csm_b13-blog-header-01-digital-sovereignty-3000x2000_e975fc4573.webp)

    ###  Digital Sovereignty Is More Than Where Your Data Lives

     24 October 2026 | David Steeb

     Notes from a roundtable at Open Source CMS 26: why governance and local expertise matter more for sovereignty than where your data is stored.

     [ Read more: Digital Sovereignty Is More Than Where Your Data Lives ](https://b13.com/knowledge/digital-sovereignty-is-more-than-where-your-data-lives)
- ![Tropical palm leaves with the text "CMS Camp Mallorca" prominently displayed in the center.](https://b13.com/fileadmin/_processed_/4/5/csm_CampMallorca2004_Headerbild_22b05fe704.webp)

    ###  More Than Professional Growth

     02 October 2026 | Jessica McQueen

     Takeaways from CMS Camp 2026 in Mallorca: visual experiences, SEO and GEO, working with AI, and inclusive design. Plus a look at what editors need from a CMS, and why their…

     [ Read more: More Than Professional Growth ](https://b13.com/blog/more-than-professional-growth-my-experience-at-cms-camp-2026)
- ![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)