Removable table elements within a module

Jessie_Johnson
Level 2

Removable table elements within a module

I have a module with tables inside which creates 4 columns (ala Cerberus email template). We would like each of those columns to be potentially removable, much the same way that adding "mktoText" around content makes it removable. But once I placed a "mktoText" div around a table structure, that area doesn't appear as editable/removable in the Marketo editor.

 

So should I assume that while "mktoText" can be used to remove basic content, it can't be wrapped around table elements?

4 REPLIES 4
Dave_Roberts
Level 10

Re: Removable table elements within a module

To the best of my knowledge that is not a limitation of the syntax. I had a look at the documents here: https://docs.marketo.com/display/public/DOCS/Email+Template+Syntax and didn't see anything that would suggest that it doesn't work with any particular element.

 

Also, you'll have to add the class="mktoText" at the template level, so if that's something you're trying to fit in via the Email (asset) editor that might lead to an issue like this.

 

Inside a module, you should be able to include an editable area and drop any kind of HTML into the "mktoText" area. Could you post a bit of the template code you're working with here (maybe just the "mktoModule" element code would suffice) for review?

 

It sounds like you're after something like this:

<div class="mktoText" id="MultiColumns" mktoName="4-Column Module">
    <table width="25%">...</table>
    <table width="25%">...</table>
    <table width="25%">...</table>
    <table width="25%">...</table>
</div><!-- /.mktoText -->

 

 

 

Jessie_Johnson
Level 2

Re: Removable table elements within a module

Thanks for the feedback, which I tested and does work. I think the issue I'm having is that you cannot nest "mktoText" containers and editable content.

 

What I have are 4 tables but with "mktoText" and "mktoImg" inside of them, which of course gives errors:

 

Error: Nested Editable Element: #presenters-p1-image
Error: Nested Editable Element: #mkto-presenter-p1-content

 

I wonder if there's another way to achieve what I need, which is a 4-column module showing webinar presenters in each column (their photo, name, brief bio), but with the ability for the editor to remove 1-to-3 of those columns, should that webinar have less presenters.

 

The only way to achieve this seems for me to create 4 separate modules, a version for 1 presenter, a version for 2 presenters, etc. As it is this email template will have 20+ module options for the editor, many of which they'll have to remove one-by-one to get down to the few they'll need for most emails. Oy! : D

Dave_Roberts
Level 10

Re: Removable table elements within a module

It's fairly common from my experience to have "kitchen sink" style email templates in Marketo b/c of the way the modules work - basically the issues you're running into here with the nested editable areas.  Another piece of the puzzle is your audience and generally it's easier for a Marketer to grab a new module and drop that into the canvas than to tinker with the HTML to remove or update certain pieces -- basically the less exposed HTML you have the safer it is in the long-run (generally).

 

Albeit a very specific solution, you might think about creating "Speaker-specific" modules and adding tokens in place of the image, name, and details. Say you had 4x Speaker Modules (1, 2, 3, and 4-columns) and in each of those modules the preset value for the Speaker 1 name was something like {{my. Speaker1 Name}}. With this kind of setup, you'd only need to update the token value in one place and it'd populate on any of the Speaker Modules you pulled in. It might get weird with multiple copies of the same module, but you'd need to edit the content in any case if you were using 2 copies of the 3-column speaker module for example. This would tie the solution to a dependence on tokens getting filled out, but sometimes that's an easier win - especially if you're already using tokens for other stuff in the email.

 

As it is this email template will have 20+ module options for the editor, many of which they'll have to remove one-by-one to get down to the few they'll need for most emails. Oy! : D

Check out the email docs here - you can use the mktoAddByDefault="false" attribute on your module elements to exclude them from the initial canvas. https://docs.marketo.com/display/public/DOCS/Email+Template+Syntax#EmailTemplateSyntax-Modules

 

mktoAddByDefault: Determines whether this module will be in the canvas of a new email that uses this template upon creation. Defaults to true (if mktoActive is false, this value is ignored). 

 

Normally when I setup an email template with a bunch of modules like this, I'll set all of the modules to mktoAddByDefault="false" except for the header and footer (or anything else like a boilerplate or social module that you'd want to include in 100% of your layouts).

Jessie_Johnson
Level 2

Re: Removable table elements within a module

This is all very helpful, thank you! I'd missed the "mktoAddByDefault" option when reviewing the documentation. In fact that may work well for the presenter question -- there could be four presenter modules available, with only one initially appearing for the marketer. And I like the idea of initially only showing the header and footer, and any other modules that will always appear, though the marketer will likely need a visual reminder of what module options are available.

 

Regarding the token option, it's tempting, but I assume this would still leave in the table structure, thus showing blank spaces which can't be filled (the designer would prefer that if less than 4 presenters appear, they appear centered, which I don't think can be done with the markup still intact).