Skip to main content
Level 1
Apr 28, 2025 2:04 AM UTC
Solved

Marketo Landing page Template

If, we are having two variant in one section, can we toggle the default value automatically in mktoBoolean tag in marketo landing page template

SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Apr 28, 2025 3:53 AM UTC

It’s always best to provide details about what you’ve tried, reduced to the most concise real-world example.

 

If you mean Can I have two sibling elements, only one of which is shown based on a boolean toggle” then yes, like so:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta class="mktoBoolean" mktoName="Overall Theme" id="globalTheme" true_value_name="Theme A" false_value_name="Theme B" true_value="theme-a" false_value="theme-b" default="true"> <title></title> <style> .themable { display: none; } .themable.${globalTheme} { display: block; } </style> </head> <body> <div class="mktoText themable theme-a" id="exampleTextA" mktoName="Text Area A"> This is an example editable text area in Theme A. </div> <div class="mktoText themable theme-b" id="exampleTextB" mktoName="Text Area B"> This is an example editable text area in Theme B. </div> </body> </html>

 

3 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Apr 28, 2025 3:53 AM UTC

It’s always best to provide details about what you’ve tried, reduced to the most concise real-world example.

 

If you mean Can I have two sibling elements, only one of which is shown based on a boolean toggle” then yes, like so:

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta class="mktoBoolean" mktoName="Overall Theme" id="globalTheme" true_value_name="Theme A" false_value_name="Theme B" true_value="theme-a" false_value="theme-b" default="true"> <title></title> <style> .themable { display: none; } .themable.${globalTheme} { display: block; } </style> </head> <body> <div class="mktoText themable theme-a" id="exampleTextA" mktoName="Text Area A"> This is an example editable text area in Theme A. </div> <div class="mktoText themable theme-b" id="exampleTextB" mktoName="Text Area B"> This is an example editable text area in Theme B. </div> </body> </html>

 

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Apr 29, 2025 4:44 PM UTC

@manjula-2 please return to your thread and check responses.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
May 13, 2025 10:19 PM UTC

@manjula-2 please return to your threads to read responses from our all-volunteer community.

Translate