Re: Can't create module block in the template

Ivan_Ilyin
Level 1

Can't create module block in the template

Hi!
I can't create custom mpdule in my template in Marketo. I read this https://docs.marketo.com/display/public/DOCS/Email+Template+Syntax . 

 

I added mktoname, class and id: class="mktoModule" mktoname="Text" id="txt1" in the table. But cant save html, it's error in id="txt1"
I can't understand what's wrong. Can you help me? 

I can create dynamic blocks in Marketo, but can't create modules.
Source code is below

 

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- emailnova.com -->
<html>

<head>
    <base target="_blank" />
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta class="mktoColor" id="Hero-bgcolor" mktoname="Hero background color" default="#ffffff" />
    <meta class="mktoColor" id="E02-bgcolor" mktoname="E02 background color" default="#F2F2F2" />
    <meta class="mktoColor" id="E03-bgcolor" mktoname="E03 background color" default="#ffffff" />
    <meta class="mktoColor" id="E04-bgcolor" mktoname="E04 background color" default="#F2F2F2" />
    <meta class="mktoColor" id="E05-bgcolor" mktoname="E05 background color" default="#ffffff" />
    <meta class="mktoColor" id="E07-bgcolor" mktoname="E07 background color" default="#ffffff" />
    <meta class="mktoColor" id="E08-bgcolor" mktoname="E08 background color" default="#ffffff" />
    <meta class="mktoColor" id="E09-bgcolor" mktoname="E09 background color" default="#F2F2F2" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <style>
    * {
        padding: 0px;
        margin: 0px;
    }

    table {
        border-collapse: collapse;
    }

    a {
        color: #464646;
        text-decoration: none;
    }

    a:active {
        color: #464646;
    }

    a:visited {
        color: #464646;
    }

    .whitetext a {
        color: #ffffff;
        text-decoration: none;
    }

    .whitetext a:active {
        color: #ffffff;
    }

    .whitetext a:visited {
        color: #ffffff;
    }

    .redtext a {
        color: #E4002B;
        text-decoration: none;
    }

    .redtext a:active {
        color: #E4002B;
    }

    .redtext a:visited {
        color: #E4002B;
    }

    @media only screen and (max-width: 620px) {
        .hide {
            display: none !important;
        }

        .h-auto {
            height: auto !important;
        }

        .fw {
            width: 100% !important;
            max-width: 600px !important;
        }

        .fw-img {
            width: 100% !important;
            max-width: 100% !important;
            height: auto !important;
        }

        .w445 {
            max-width: 445px !important;
        }

        .nopad {
            padding: 0px 0px 0px 0px !important;
        }

        .plr0 {
            padding-left: 0px !important;
            padding-right: 0px !important;
        }

        .plr20 {
            padding-left: 20px !important;
            padding-right: 20px !important;
        }

        .plr30 {
            padding-left: 30px !important;
            padding-right: 30px !important;
        }

        .pt20 {
            padding-top: 20px !important;
        }

        .pt30 {
            padding-top: 30px !important;
        }

        .pb20 {
            padding-bottom: 20px !important;
        }

        .pb30 {
            padding-bottom: 30px !important;
        }

        .h20 {
            height: 20px !important;
        }
    }
    </style>
</head>

<body topmargin="0" style="background-color:#ffffff; margin:0; padding:0; text-align:left; -webkit-text-size-adjust:none;">
    <div style="background-color:#ffffff;">
        <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#ffffff">
            <tbody>
                <tr>
                    <td align="center" valign="top" width="100%" height="100%">
                        <!-- view in browser -->
                        <table cellspacing="0" cellpadding="0" width="100%" border="0" align="center">
                            <tbody>
                                <tr>
                                    <!--[if (gte mso 9)|(IE)]>
                <td>
                  <table cellspacing="0" cellpadding="0" width="600" border="0" align="center">
                    <tr>
                      <![endif]-->
                                    <td valign="top" align="center" width="100%" style="padding:10px 0px 10px 0px;">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width:600px;">
                                            <tbody>
                                                <tr>
                                                    <td align="center" width="100" style="font-size:11px; line-height:14px;" class="pr10"> <span style="font-family: 'Open Sans',Helvetica,Arial,sans-serif; font-size:11px; line-height:14px; font-weight: 200; color:#7e8890;">
                                                            <div class="mktoText" id="web" mktoname="View on web">
                                                                <a href="{{system.viewAsWebpageLink}}" style="color:#7e8890;text-decoration:underline;">View on website</a>
                                                            </div>
                                                        </span> </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                    <!--[if (gte mso 9)|(IE)]>
                    </tr>
                  </table>
                </td>
                <![endif]-->
                                </tr>
                            </tbody>
                        </table>
                        <div style="height: 50px; line-height: 50px; font-size: 48px">&nbsp;</div>
                        <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table700" style="max-width: 700px; min-width: 320px; width: 100%;">
                            <tr>
                                <td align="center" valign="top" style="background: #FFFFFF; box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.11);">
                                    <div class="mktoImg" id="logo" mktoname="Image">
                                        <a href="https://www.rockwool.ru/" target="_blank"><img src="https://imgems.ru/rockwool/welcome1/logo.jpg" width="700" border="0" alt="" style="display: block; width: 100%; max-width: 700px;" /></a></div>
                                    <table align="center" cellpadding="0" cellspacing="0" border="0" width="85.8%">
                                        <tr>
                                            <td align="left">
                                                <div style="height: 30px; line-height: 30px; font-size: 28px">&nbsp;</div>
                                                <div class="mktoText" id="speakerName" mktoname="Speaker Name Text">
                                                    <strong style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 24px; color: #2F2F2F;">
                                                        Спасибо, что подписались!
                                                    </strong></div>
                                                <div style="height: 25px; line-height: 25px; font-size: 23px">&nbsp;</div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <table align="center" cellpadding="0" cellspacing="0" border="0" width="85.8%" class="mktoModule" mktoname="Text" id="txt1">
                            <tr>
                                <td align="left">
                                    <div style="height: 20px; line-height: 20px; font-size: 18px">&nbsp;</div>
                                    <span style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; color: #2F2F2F;">
                                        Если в&nbsp;дальнейшем у&nbsp;вас возникнут вопросы&nbsp;&mdash; ответьте на&nbsp;наше письмо или позвоните по&nbsp;телефону:
                                    </span>
                                    <div style="height: 10px; line-height: 10px; font-size: 8px">&nbsp;</div>
                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                        <tr>
                                            <td width="40" align="left">
                                                <img src="https://imgems.ru/rockwool/welcome1/phone.png" width="20" border="0" alt="" style="display: block;" />
                                            </td>
                                            <td align="left">
                                                <strong style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; color: #2F2F2F;"><a href="tel:88002002277" target="_blank" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; color: #2F2F2F; text-decoration: none;">8 800 200 22 77</a></strong><br />
                                                <strong style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; color: #2F2F2F;"><a href="tel:89639966494" target="_blank" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; color: #2F2F2F; text-decoration: none;">8 963 996 64 94</a> (запись на&nbsp;тренинг)</strong>
                                            </td>
                                        </tr>
                                    </table>
                                    <div style="height: 25px; line-height: 25px; font-size: 23px">&nbsp;</div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</body>

</html>

 

 

1 REPLY 1
Beth_Massura
Level 8 - Champion

Re: Can't create module block in the template

Hi Ivan, it looks like you're missing a "container". You need to define a container that contains any and all modules for the template (and the container can have only modules inside it, nothing else)

 

See https://docs.marketo.com/display/public/DOCS/Email+Template+Syntax#EmailTemplateSyntax-Containers

 

Specified using either <table>, <tbody>, <thead>, <tfoot> or <td> with class=”mktoContainer”

 

Hope this helps!