Copied Modules - Copied Attributes? | Community
Skip to main content
Shaina_Antila
Level 2
January 10, 2019
Question

Copied Modules - Copied Attributes?

  • January 10, 2019
  • 1 reply
  • 1747 views

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!

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

1 reply

Dave_Roberts
Level 10
January 10, 2019

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

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 2
January 21, 2019

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