Jump to content

[SOLVED] how to define class "active" in Homeslider module


Recommended Posts



I've created a custom theme with bootstrap and a problem occured with the homeslider.


I want the class "active" to only be printed on the first slide and I do not know how to accomplish this with smarty.


Here is the code right now:


{if isset($homeslider_slides)}
 <div id="homeslider" class="carousel slide">
  <div class="carousel-inner">
   {foreach from=$homeslider_slides item=slide}
    {if $slide.active}
     <div class="item active">
       <img src="{$smarty.const._MODULE_DIR_}homeslider/images/{$slide.image|escape:'htmlall':'UTF-8'}" alt="{$slide.legend|escape:'htmlall':'UTF-8'}" height="{$homeslider.height|intval}" width="{$homeslider.width|intval}" />

<a class="left carousel-control" href="#homeslider" data-slide="prev">
<span class="icon-prev"></span>
   <a class="right carousel-control" href="#homeslider" data-slide="next">
     <span class="icon-next"></span>

Any idea on how to do this?



Edited by vekia (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...