blank email (v2.0) with variables in module

JD_Nelson
Level 10 - Community Advisor

blank email (v2.0) with variables in module

if I have a relatively blank email, yet extensive modules, how, utilizing the new "mktoAddByDefault="False"" do I associate variables to the module without adding it to the content section?

Maybe I'm not using the mktoAddByDefault="False" correctly - but when I attempt, it's not appearing at all, let alone with missing variables, as I anticipated.

Tags (2)
5 REPLIES 5
Grégoire_Miche2
Level 10

Re: blank email (v2.0) with variables in module

Hi JD.

I am not sure I fully understand your issue. So this is what I have tested and made to work:

  • The "mktoAddByDefault" needs to be set in the <tr class="mktoModule"> tag. This will only decide whether the modules is displayed by default or not. Do not set the "mktoActive" attribute
  • The variables that you want to use in the modules need to be defined in the template <head>, as you do usually with Variables. Once defined in the head, you can use them freely throughout the template. If you want the variables to have different values on each module or each module clone, add mktoModuleScope="True" to the variable definition.

-Greg

Justin_Cooperm2
Level 10

Re: blank email (v2.0) with variables in module

Hi JD,

It works as follows:

  • mktoAddByDefault can be added to the declaration of any module to indicate that the module is part of the template, but should NOT be added to new emails by default. The module IS still available in the right-hand "Modules" pane for insertion.
  • You can use variables within any module you've defined. If the variable was originally declared as mktoModuleScope="false" (the default), then the variable value the user sets in the editor will apply everywhere the variable is used (inside or outside of modules). If the variable was originally declared as mktoModuleScope="true" then each instance of a module in your email that contains that variable will have its own independent value for that variable.

Justin

Grégoire_Miche2
Level 10

Re: blank email (v2.0) with variables in module

Hi Justin,

Ditto

Your english is definitely better than mine

-Greg

JD_Nelson
Level 10 - Community Advisor

Re: blank email (v2.0) with variables in module

Would it be safe to say that the Template needs to be built with every module in use, but only IN the actual body copy, when the module is called do we determine whether the module is utilized or not? That actually starts to make sense, but it not clearly stated anywhere -

Grégoire_Miche2
Level 10

Re: blank email (v2.0) with variables in module

Yes, the template needs to have all the potential modules in the mktoContainer. Some of them will be displayed by default (mktoAddByDefault="true") and some will not (mktoAddByDefault="False") and will be part of the right "Module" pane.

-Greg