:::

4-4 templates/op_snews_list.tpl

<style>
    img.cover  {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
</style>

<div class="row">
    <{foreach from=$all key=i item=snews}>
        <div class="col-sm-4">
            <a href="index.php?sn=<{$snews.sn}>">
                <{if $snews.cover}>
                    <img src="<{$snews.cover}>" alt="<{$snews.title}>" class="cover">    
                <{else}>
                    <img src="https://picsum.photos/400/200?image=<{$i}>" alt="<{$snews.title}>" class="cover">
                <{/if}>
            </a>
            <{$snews.title}>
        </div>  

    <{foreachelse}>
        <div class="alert alert-danger">
            尚無內容
        </div>
    <{/foreach}>
</div>

<{$bar}>

<{if $smarty.session.snewsAdmin}>
    <div class="text-center">
        <a href="<{$xoops_url}>/modules/snews/admin/main.php?op=snews_form" class="btn btn-primary">新增文章</a>
    </div>
<{/if}>

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D44%26tbdsn%3D1452

書籍目錄

展開 | 闔起

線上使用者

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

會員: 0

訪客: 32

更多…