If, we are having two variant in one section, can we toggle the default value automatically in mktoBoolean tag in marketo landing page template
Solved! Go to Solution.
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>
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>
@Manjula please return to your thread and check responses.
@Manjula please return to your threads to read responses from our all-volunteer community.