Copied Modules - Copied Attributes?

Shaina_Antila
Level 1

Copied Modules - Copied Attributes?

Hey team --

I'm working to solve an issue in an existing template and wanted to see if it's possible. The issue is as follows:

- You have a module with attributes defined, ex: 40px top padding

- You copy said module

- Attributes (40px top padding) are still "connected" and if you change one, it changes the other

It seems to me that the way Marketo variables work, you'd need a separate variable for each "padding-top" value, etc, and that there's no way to disrupt the connection between copied modules?

Thanks so much for your help!

2 REPLIES 2
Dave_Roberts
Level 10

Re: Copied Modules - Copied Attributes?

Hey Shaina,

There are two "ways" to apply variables that fit (and don't) the issue you're seeing here - they have something to do with the "Module Scope" assigned to the variable.

One is "global" - which describes the behavior you're seeing where you change one and it changes the rest.

The other is "local" - which allows each new module to be updated independently.

Here's an example from Marketo's Docs on EM Variables Email Template Syntax - Marketo Docs - Product Documentation

Screenshot_011019_050958_PM.jpg

There is a optional attribute called mktoModuleScope which defines this relationship. It is set on each variable (purple code on the template at the top) and in your case (where you want them to change independently) it should be set to "true". If this attribute isn't included in the variables, it'll default to false -- so likely it's either missing or set to mktoModuleScope="false".

You should be able to find the variables in the <head> of your Email template, it'll look something like this:

<meta class="mktoString" id="VariableIdHere" mktoName="Module Name" value="default value goes here" mktoModuleScope="true">

If you don't see the part at the end of your variables, you can just paste it in there to make each variable independent instead of "global".

Shaina_Antila
Level 1

Re: Copied Modules - Copied Attributes?

Thanks so much for your help, Dave! Adding the mktoModuleScope="true" to my variables did the trick!