mktoImage for a background image? | Community
Skip to main content
September 5, 2017
Question

mktoImage for a background image?

  • September 5, 2017
  • 5 replies
  • 7819 views

I currently have the background image of a row set but would like to make this editable for some people on staff.

Current code looks like this:

<tbody>

<tr>

<td style="background-image: url(URL GOES HERE);>

<tbody>

<tr>

<td style="background-image: url(URL GOES HERE);>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

September 13, 2017

So, the code I used (that ultimately didn't work) was...

In <head>

<meta class="mktoImg" id="BannerSectionBG" mktoname="Hero Image" default="land.ableto.com/rs/781-OEC-803/images/Face-Post-1200-GetBack9.jpg" />

In <body>

<td height="150" width="300" bgcolor="#FFF" style="background-image:${BannerSectionBG};>

Any ideas?

Akshay_Pant
New Participant
September 13, 2017

Hi Andrew,

Please make edits in the following sections:

<head>

<meta  mktoModuleScope="true" class="mktoString" id="BannerSectionBG" mktoname="Hero Img" default="land.ableto.com/rs/781-OEC-803/images/Face-Post-1200-GetBack9.jpg" />

<body>

<td height="150" width="300" background="${BannerSectionBG}"  bgcolor="#FFF"  style="background-image:url('${BannerSectionBG}');background-size: cover;background-repeat:no-repeat;">

Regards,

Akshay Pant

September 13, 2017

Thanks for the quick reply.

The image is showing up, however, it's still not editable. See below.

September 11, 2017

sorry, i actually have "background-image:${BannerSectionBG};"

September 11, 2017

Thanks everyone for the replies.

So I used the following code, but I don't have an editable content block under "Content" int he Marketo Email Editor.

<meta class="mktoImg" id="BannerSectionBG" mktoname="Hero Image" default="land.ableto.com/rs/781-OEC-803/images/Face-Post-1200-GetBack9.jpg" />

<td height="150" width="300" bgcolor="#FFF" style="background-image:url(${BannerSectionBG});

The image shows up, but I still can't edit it in the editor...if that makes sense.    

Akshay_Pant
New Participant
September 6, 2017

Hi Andrew Pennell,

I believe this is an email , Please declare a variable in the head section.

<meta  mktoModuleScope="true" class="mktoString" id="BannerSection-Bg" mktoname="BannerSection-Bg Img" default="image-URL" />

Also, use this variable at the place of background-image by referring the id of variable.

E.g. <td style="background-image:${BannerSection-Bg}">

Thanks,

Akshay Pant

Grégoire_Miche2
New Participant
September 8, 2017

Sorry Akshay, but better use an img variable than a string one in you are in a email v2.

So the code is

Header :

<meta class="mktoImg" id="heroBackgroundImage" mktoName="Hero Background Image" default="company.com/image.jpg" mktoModuleScope="true" >

Body :

<td style="background-image:${heroBackgroundImage}">

-Greg

Grégoire_Miche2
New Participant
September 6, 2017

Hi Andrew,

If it's an email, use a Mkto Variable.

On landing page, use a simple variable, but you will have to paste the image URL, you will not have an image picker. Vote here :

-Greg