Re: Guided Template - Boolean to add display:none style not working as expected.

blagged
Level 1

Guided Template - Boolean to add display:none style not working as expected.

I have a guide template that i'm creating with a timeline element. I would like to have upto 10 timeline items that can be toggled on and off.

 

I've looked to implement boolean to acheive this but when added and turned off / on nothing happens. My code is as follows:

In the Head:

<meta class="mktoBoolean" id="showTimeline1" mktoName="Show Timeline 1?" default="true" false_value="none" true_value="block" false_value_name="Hide" true_value_name="Show">


In the body:

<div class="timeline-item" style="display:${showTimeline1};">
     <div class="timeline-point">
            <div class="timeline-point__marker"></div>
            <div class="timeline-point__title font_size_18 title_upper">1</div>
            <div class="timeline-point__text">Zelle goes live.</div>
</div>
</div>


The ability to toogle on or off appears in system, but as it doesnt actually add the display: none when set to true. The source regardless of the toogle state is:

<div class="timeline-item" style="display: inline-block; width: 100%;">
          <div class="timeline-point">
                    <div class="timeline-point__marker"></div>
                     <div class="timeline-point__title font_size_18 title_upper">1</div>
                     <div class="timeline-point__text">Zelle goes live.</div>
        </div>
</div>
</div>
</div>


Any help greatly appreciated

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Guided Template - Boolean to add display:none style not working as expected.

Sounds like me you have duplicate modules and/or are looking in the wrong place. Or maybe haven’t approved the template and re-added the module.

 

Marketo won’t come up with the value

 inline-block; width: 100%;

on its own.