Email syntax -- optional image element | Community
Skip to main content
Matt_Stone2
Level 9
October 23, 2018
Solved

Email syntax -- optional image element

  • October 23, 2018
  • 1 reply
  • 5032 views

Looking through the Marketo email syntax documentation, I was wondering if it's possible to code an image element, but make it removable at the same time?

Here's my example:

<tr class="mktoModule" id="section2" mktoName="Section 2">

   <td>

      <div class="mktoImg" id="section2_img" mktoName="Section 2 Image" mktoImgLink="https://www.google.com/" mktoImgWidth="540" mktoImgHeight="189" mktoLockImgSize="false">

         <a><img style="display: block; border-width: 0;"></a>

      </div>

   </td>

</tr>

The element shows great, but if the user opts to not use an image, they're stuck.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Grégoire_Miche2

Essentially I'm wanting to be able to create a second container, which isn't possible. I have a module that is a block of text with an image, and I want that image to be an optional image element so it can be removed easily if it's not desired. But based on what you're saying about modules, it won't work and I'll need to break it into a second module entirely. Sorry if I can't articulate it properly, but I think I have my answer.


Hi again Matt,

That's clear now I just did not understand this because the code sample you provided does not contain the mktoText element.

and indeed, the answer is to break your module in 2.

-Greg

1 reply

Grégoire_Miche2
Level 10
October 24, 2018

Hi Matt,

The whole <tr class="mktoModule"> is removable, not the element. And to be removable, the module has to be in a container.

-Greg

Matt_Stone2
Level 9
October 24, 2018

That's what I figured. So I'd either have to break the image out into a separate module, or ditch the image element and let people directly code it.

Grégoire_Miche2
Level 10
October 24, 2018

Hi again Matt,

at the moment, the image is already in a seperate module. In other term, the only thing the modiule with ID section2 contains is the image. If you remove the module, you remove the image and its placeholder.

so I am not sure I am following you.

-Greg