Carrot does not show photo

1

Well, I have a carcel where I get the "images" (in fact they are just names of the images) in the database and I make a foreach in the carcel plus the images do not appear. When I view the source code I see that the images are embedded in the pages and they see on the page but does not show the images in the car. What could it be?

My car:

<div id="content">
<div class="container no-padding">
    <div class="row">
        <!-- Carousel Slideshow -->
        <div id="carousel-example" class="carousel slide" data-ride="carousel">
            <!-- Carousel Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel-example" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example" data-slide-to="1"></li>
                <li data-target="#carousel-example" data-slide-to="2"></li>
            </ol>
            <div class="clearfix"></div>
            <!-- End Carousel Indicators -->
            <!-- Carousel Images -->

            <?php
                foreach ($imagem as $value) {
                    if ($value->imagem_status == true) {?>
                        <div class="item">
                            <img src="<?php echo base_url('tema/assets/img/site/'.$value->imagem_link) ?>">
                        </div>

                  <?php }
                }
            ?>



            </div>
            <!-- End Carousel Images -->
            <!-- Carousel Controls -->
            <a class="left carousel-control" href="#carousel-example" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
            </a>
            <a class="right carousel-control" href="#carousel-example" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
            </a>
            <!-- End Carousel Controls -->
        </div>
        <!-- End Carousel Slideshow -->
    </div>
</div>

I wonder if you have a solution for this.

    
asked by anonymous 21.10.2016 / 07:07

1 answer

1

I have an example that I use here and it works fine, the only thing that seems to be missing is the div of the image an class active item you need to have a div with a class active .

Here's the example I have: Home '                                                                                                           

        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
            <?php foreach($slider as $slide):?>
            <div <?php echo ($slide->class == 1)?"class='item active ctrl'":"class='item ctrl'"?>>
                <img src="<?php echo base_url('images/slider/'.$slide->image);?>" alt="Destaques">
                <div class="carousel-caption">
                    <h3><?php echo $slide->titulo; ?></h3>
                </div>
            </div>
            <?php endforeach; ?>
        </div>'
    
21.10.2016 / 08:36