# CakePHP Bake :: Create Element file on bake command

**URL:** <https://discourse.cakephp.org/t/cakephp-bake-create-element-file-on-bake-command/8555>\
**Category:** Uncategorized\
**Created:** [October 28, 2020, 5:59pm UTC](https://discourse.cakephp.org/t/cakephp-bake-create-element-file-on-bake-command/8555 "2020-10-28T17:59:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ar1983](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@ar1983](https://discourse.cakephp.org/u/ar1983)\
**Post date:** [October 28, 2020, 5:59pm UTC](https://discourse.cakephp.org/t/cakephp-bake-create-element-file-on-bake-command/8555/1 "2020-10-28T17:59:38Z")

</div>

I’ve created a plug-in, and inside that plug-in I’ve got a custom bake template. I’d like to create an Element file `_head.ctp` inside the `/src/Template/Element/` folder when I execute the bake command.

The element file will consist of a code:

```auto
<div class="row">
    <div class="card-block">
        <a href="<?= $this->Url->build(array('action' => 'add', '_ext' => 'html')); ?>" class="btn btn-primary"><i class="icon-plus-circle2 position-left"></i> Add</a>&nbsp;&nbsp;&nbsp;
        <a href="<?= $this->Url->build(array('action' => 'index', '_ext' => 'html')); ?>" class="btn btn-primary"><i class="icon icon-grid2 position-left"></i> List All <?= __('{{ pluralHumanName }}') ?></a>
    </div>
</div>

```

Bake command which I’m using is: `bin\cake bake all Customers --prefix backend --theme MyBakeTheme`

**NOTE:** Once I’ll execute this command my Element file `_head.ctp` should create inside the `/src/Template/Element/Customer` folder.

CakePHP v3.8.2 and Bake v1.x.

Can someone please assist in how I can create a custom Element file?

Thanks for your help.
