How to use an existed dynamic content in emails

Your software
My Mautic version is: 4.4.7
My PHP version is: 8.0.25
My Database type and version is:10.6.12-MariaDB-0ubuntu0.22.04.1

I have created a DWC element that I want to use in a mail template. How can I retrieve this already existing element in the mail ?
I use MJML for the mails, and have a GrapesJS builder.

I have tried to retrieve the dynamic content through this element:

<mj-text data-gjs-type="dynamic-content" data-slot="slotname" data-param-dec-id="2">Dynamic Content 2</mj-text>

But it does not work.
i have also tried this:

{dwc=slotname}

But it does not work.

Hi, DWC means Dynamic Web content.
You can’t use it in emails.
You need to use Dynamic Email Content.
In code mode:

Or through the GUI.


do you mean that ?
but so I have to build the DEC individually for each mail ?

There are many ways you can do this. I’m not sure what is inside of your dyn content.

Maybe look at this plugin:
https://github.com/Logicify/mautic-advanced-templates-bundle

i want to implement salutation for the mails. I have a contactfield “Salutation” and then conditional to this field i should be Hello Mr. or Hello Ms.
which way will work with MJML?

I’m not sure what are you asking “which way”
You can set:
If Salutation is “Mr”, then use this dyn content, if it’s “Ms” use the other one.

because of your comments up there, I asked which way. I would like to know if it is somehow possible to store the logic for salutation in a central place, and reference to it in each mail to this DC somehow. So a kind of reuse.

Okay, I figured you read the documentation of the plugin I mentioned above: https://github.com/Logicify/mautic-advanced-templates-bundle

Or this article mentioning another great plugin:

It is there exactly how you can use a generic salutation.

okay thanks a lot.
Can you please tell me bevor i install the plug in if it is compatible with MJML and GrapesJS Builder for MJML?
Here where i work, to install a plug-in for Mautic it is not so easy, because some steps have to be done before the plugin can be installed.

I see.
I personally tested this one and use it on over 80 installations with grapejs
https://mtcextendee.com/marketplace/twig-templates-for-mautic/

The other one is recently forked, I haven’t tested yet, but I think it is compatible.