Set Up your First Container

For setting setup the container in your theme, you can always add them under

themes/theme_dir/elements/containers/

Follow the steps to create your first container inside your theme

Create Container Template File

To define a container within your site navigate to Dashboard->Pages & Themes->Containers

Here, click on "Add Container" following by giving it a name and handle, you need to make sure that the handle name must be as same as the container PHP file inside the containers directory.

Creating containers is similar to creating templates files, inside your container PHP file you need to define

use Concrete\Core\Area\ContainerArea;

Now, you need to define container area within this template like this

$area = new ContainerArea($container, ‘container_name’);
$area->display($c);

This will add an editable area within your container.

Creating Container objects through Content XML

Containers can also be created and installed with the theme. You can find its usage inside Atomik theme documentation where you can see how you can create and assign Containers to page templates.

Adding Containers to a page

Adding containers to a page is as same as adding a block to a page.