I am working with Bootstrap and EE 3.4.5 Grid and need a little help on the carousel.

With the following code all instances of the slide have class 'active'

<div id="myCarousel" class="carousel slide" data-ride="carousel"> 
  <!-- Indicators -->

  <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
    <li data-target="#myCarousel" data-slide-to="2"></li>

  <div class="carousel-inner">
    <div class="item {if count == 1}active{/if}"> <img src="{slider:photo}" style="width:100%" alt="First slide">
      <div class="container">
        <div class="carousel-caption">
          <p><a class="btn btn-lg btn-primary" href="{slider:links_to}" role="button">{slider:button_text}</a></p>
 </div><!-- /.carousel-inner -->

If I remove {if count == 1}active{/if} the carousel disappears, but I only need active on the first slide. Any suggestions?

1 Answer 1


I just realized that because it is in a grid it requires the following:

{if slider:count == 1}active{/if}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.