# Twig variable in themes to detect builder

**URL:** <https://forum.mautic.org/t/twig-variable-in-themes-to-detect-builder/31166>\
**Category:** Ideas and Feature Requests\
**Created:** [March 6, 2024, 8:54am UTC](https://forum.mautic.org/t/twig-variable-in-themes-to-detect-builder/31166 "2024-03-06T08:54:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![a.towne](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/a.towne/32/1351_2.png) [@a.towne](https://forum.mautic.org/u/a.towne)\
**Post date:** [March 6, 2024, 9:24pm UTC](https://forum.mautic.org/t/twig-variable-in-themes-to-detect-builder/31166/4 "2024-03-06T21:24:54Z")

</div>

There are a few similar requests in the forum:

> [@E-Mail PreHeader](https://forum.mautic.org/t/e-mail-preheader/13245):
>
> Hi Mauticians. I was wondering if anyone has had any success in inserting a pre-header into a Blank Template email. I know how to do this if I build the html myself, however finding it challenging to do manually. Regards, Mike

> [@Email Preview / Preheader Text](https://forum.mautic.org/t/email-preview-preheader-text/7717):
>
> I noticed today that our client’s email preview text in Appl Mail consisted of the unsubscribe content, which we have placed at the beginning of the email, clearly not helping with open rates and needs optimised. It would be great to add an extra field into the interface for such content to be added automatically from the main body or added manually. With exception to manually creating a hidden content area, is there an easier way to achieve this? Cheers Derek

> [@Email Preheaders?](https://forum.mautic.org/t/email-preheaders/9213):
>
> I’m not seeing how to implement/modify email preheaders. Can anyone point me in the right direction? Google search didn’t provide an answer. Thanks!

> [@Allowing to define the email preheader text](https://forum.mautic.org/t/allowing-to-define-the-email-preheader-text/10604):
>
> There was already a well defined github issue, which didn’t make it into this list: [https://github.com/mautic/mautic/issues/2800](https://github.com/mautic/mautic/issues/2800) This is an important way to improve email opening rates. With an additional field users could easily define the preheader. However, it needs to be injected into the mail at the right place.

> [@Edit email header](https://forum.mautic.org/t/edit-email-header/7253):
>
> Hi, I am new on Mautic and I take the opportunity to congrats all of the contributors of this great project … I have a question : I would like to personalise the header of the email I send with mautic. The reason is I want to use some tricks to help my email not consider as spam, especially with microsoft email server ([outlook.com](http://outlook.com), [hotmail.com](http://hotmail.com)). Is there a way with the GUI to do that ? Is it possible to do that with a modification of a php file ? If yes, could you give me some he…

Personally, I’d love to see a field on the email edit page (before the builder) for a user to define the preheader and that would get added to the email when it’s sent to the relay service.

I haven’t been able to figure out how to use the headers to build an email with annotations to appear in the Gmail promotions tab, but this seems like it would be related to work to make the preheader text easier to edit: [Menganotasi email di tab Promosi &nbsp;|&nbsp; Gmail &nbsp;|&nbsp; Google for Developers](https://developers.google.com/gmail/promotab/overview)

In the [Acquia documentation](https://docs.acquia.com/campaign-studio/channels/emails/email-builder#html-block) for our email builder, we have code to copy/paste into an HTML block at the beginning of the email:

```auto
 <div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: 'Raleway',sans-serif;">This is preheader text</div>
                                                                                                                                            <!-- Visually Hidden Preheader Text : END -->

```

This should work in any builder - we didn’t make any changes between the legacy builder and the BEE builder (which is what Acquia uses, rather than GrapesJS)

Is this helpful for what you’re trying to do?

---

_[View the full topic](https://forum.mautic.org/t/twig-variable-in-themes-to-detect-builder/31166)._
