# Difficulty creating new button

**URL:** <https://forum.mautic.org/t/difficulty-creating-new-button/25727>\
**Category:** Development\
**Tags:** development\
**Created:** [October 18, 2022, 4:21pm UTC](https://forum.mautic.org/t/difficulty-creating-new-button/25727 "2022-10-18T16:21:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrelp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrelp/32/8459_2.png) [@andrelp](https://forum.mautic.org/u/andrelp)\
**Post date:** [October 18, 2022, 4:21pm UTC](https://forum.mautic.org/t/difficulty-creating-new-button/25727/1 "2022-10-18T16:21:47Z")

</div>

I’m trying to develop a plugin that needs a CRUD and from what I’ve seen in the internal codes mautic has a peculiar way of calling the create button in the header.

```auto
<?php 
    $view->extend('MauticCoreBundle:Default:content.html.php');

    $view['slots']->set('headerTitle', $view['translator']->trans('plugin.nextfourgroups.admin'));
    $view['slots']->set('actions', $view->render('MauticCoreBundle:Helper:page_actions.html.php'));

?>

```

For me this is kind of confusing precisely because I don’t deal with syfony. How do I make the new button appear at the top?  
Is this what the documentation calls events? would it be a subscribe event?

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [October 18, 2022, 5:18pm UTC](https://forum.mautic.org/t/difficulty-creating-new-button/25727/2 "2022-10-18T17:18:01Z")

</div>

Buttons at the top usually come from form configuration. But you can create any button you want with html.

Tying that button to backend code however could be trickier.

---

<div class="post-metadata">

**Author:** ![andrelp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrelp/32/8459_2.png) [@andrelp](https://forum.mautic.org/u/andrelp)\
**Post date:** [October 19, 2022, 12:35pm UTC](https://forum.mautic.org/t/difficulty-creating-new-button/25727/3 "2022-10-19T12:35:13Z")

</div>

yes, that’s why for me using the native structure would be the best way, I’m imagining that I have to use mautic triggers.  
Found this tutorial: [Extending campaigns](https://developer.mautic.org/#extending-campaigns)

Is this what is missing to make the button appear in the code? Could you help me by giving details, don’t give me a definitive example for this.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [October 19, 2022, 4:58pm UTC](https://forum.mautic.org/t/difficulty-creating-new-button/25727/4 "2022-10-19T16:58:45Z")

</div>

Hi look at how lunch builder button is added in core:

> <https://github.com/mautic/mautic/blob/4dcd627a78503b2f1f4537b7d8aa647e13261f34/app/bundles/CampaignBundle/Form/Type/CampaignType.php#L135>
