:::

6-7 xotpl\carousel.tpl

<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
    <div class="carousel-inner">

        <{foreach from=$slider_var key=k item=slide name=slider_var}>
            <!-- 從0開始的次數 <{$smarty.foreach.slider_var.index}> -->
            <!-- 從1開始的次數 <{$smarty.foreach.slider_var.iteration}> -->

            <div class="carousel-item <{if $smarty.foreach.slider_var.index == 0}>active<{/if}>">
                <img src="<{$slide.file_url}>" class="d-block w-100" alt="<{$slide.file_name}>">
            </div>
        <{/foreach}>
    </div>
    <{if $show_slide_control=='1'}>
        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    <{/if}>
</div>

 


:::

搜尋


書籍目錄

展開 | 闔起

線上使用者

20人線上 (5人在瀏覽線上書籍)

會員: 0

訪客: 20

更多…