# Creating a container

**URL:** <https://forums.concretecms.org/t/creating-a-container/3524>\
**Category:** Developing with Concrete\
**Created:** [July 13, 2022, 10:31pm UTC](https://forums.concretecms.org/t/creating-a-container/3524 "2022-07-13T22:31:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xb385](https://forums.concretecms.org/user_avatar/forums.concretecms.org/xb385/32/3764_2.png) [@xb385](https://forums.concretecms.org/u/xb385)\
**Post date:** [July 13, 2022, 10:31pm UTC](https://forums.concretecms.org/t/creating-a-container/3524/1 "2022-07-13T22:31:03Z")

</div>

Hi, ive been looking through the documentation and cheatsheets but i can’t find a way to programmatically add containers…anyone got any idea how, i was thinking something like the following should be possible:

$pTemplate = PageTemplate::getByHandle(‘three\_column’);  
if(!$pTemplate) {  
PageTemplate::add(‘three\_column’, t(‘Three Column’), ‘three\_column.png’, $pkg = null);  
}

---

<div class="post-metadata">

**Author:** ![hutman](https://forums.concretecms.org/user_avatar/forums.concretecms.org/hutman/32/6198_2.png) [@hutman](https://forums.concretecms.org/u/hutman)\
**Post date:** [July 14, 2022, 1:34pm UTC](https://forums.concretecms.org/t/creating-a-container/3524/2 "2022-07-14T13:34:56Z")

</div>

There are 2 files in the code I can find where a new container is created, doesn’t look quite as simple as some other things.

> <https://github.com/concretecms/concretecms/blob/9.1.0/concrete/controllers/single_page/dashboard/pages/containers/add.php>

> <https://github.com/concretecms/concretecms/blob/9.1.0/concrete/src/Backup/ContentImporter/Importer/Routine/ImportContainersRoutine.php>

If you have a package it might be easier to just do it using the CIF stuff like they do in the Atomik

[https://github.com/concretecms/concretecms/blob/9.1.0/concrete/config/install/packages/atomik\_full/content.xml](https://github.com/concretecms/concretecms/blob/9.1.0/concrete/config/install/packages/atomik_full/content.xml) (around line 447)

---

<div class="post-metadata">

**Author:** ![xb385](https://forums.concretecms.org/user_avatar/forums.concretecms.org/xb385/32/3764_2.png) [@xb385](https://forums.concretecms.org/u/xb385)\
**Post date:** [July 15, 2022, 1:25pm UTC](https://forums.concretecms.org/t/creating-a-container/3524/3 "2022-07-15T13:25:20Z")

</div>

Thx hutman, that really helps!
