熱門(mén): 免費(fèi)試用, 常見(jiàn)問(wèn)題, 內(nèi)容管理, 商品管理, 備案類(lèi)型流程指導(dǎo), 如何安裝, 重新安裝, 如何更換模板 , 忘記網(wǎng)站密碼
內(nèi)頁(yè)模板布局主要分三部分,頁(yè)頭/頁(yè)中/頁(yè)底。
{template 'header.html'}
商品展示內(nèi)容頁(yè)其他調(diào)用項(xiàng)都與普通內(nèi)容頁(yè)雷同,區(qū)別在于多出了商品信息和圖片輪播部分。
內(nèi)容頁(yè)頁(yè)中調(diào)用可參考[ 查看 ]
{template 'footer.html'}
<table> {if $archive['attr2']}//判斷是否填寫(xiě)了價(jià)格 <tr> <th>{lang('price')}:</th> <td>{lang('unit')}<strong>{$archive['attr2']}</strong></td>//商品價(jià)格 </tr> {if $archive['attr2']==$archive['oldprice']}//判斷是否設(shè)置了會(huì)員組折扣 {else} <tr> <th>{lang('list_price')}:</th> <td>{lang('unit')}<strong style="text-decoration:line-through;">{$archive['oldprice']}</strong></td>//原價(jià) </tr> <tr> <th>{lang('discount')}:</th> <td>{lang('unit')}<strong>{jsPrice($archive['aid'])}</span></td>//折扣價(jià) </tr> {/if} {/if} </table> </div> <div> <table> {if config::get('isecoding')=='1'}//判斷是否生成防偽碼 <tr> <th>{lang('ecoding')}:</th> <td>{if $archive['ecoding']}{$archive['ecoding']}{else}{lang('not')}{/if}</td>//防偽碼 </tr> {/if} <tr> <th>{lang('adddate')}:</th> <td>{$archive['adddate']}</td>//發(fā)布時(shí)間 </tr> <tr> <th>{lang('strgrades')}:</th> <td>{$archive['strgrade']}</td>//內(nèi)容評(píng)級(jí) </tr> </table> </div> {if $archive['attr2']}//判斷是否填寫(xiě)價(jià)格,填寫(xiě)則顯示購(gòu)買(mǎi)和購(gòu)物車(chē)按鈕 <p class="blank30"></p> <ul class="nav nav-pills" role="tablist"> <li role="presentation" class="active"><a target="_blank" href="{url('archive/orders/aid/'.$archive['aid'],true)}">{lang('buy')} <span class="badge">Buy</span></a></li>//購(gòu)買(mǎi)按鈕 <li role="presentation" class="active"><a href="{url('archive/doorders/aid/'.$archive['aid'],true)}" id="dialog_link" data-toggle="modal" data-target=".bs-example-modal-lg-shopping" aria-hidden="true">{lang('makeorders')} <span class="badge">Shopping Cart</span></a></li>//購(gòu)物車(chē)按鈕 </ul> <p class="blank30"></p> {/if}
<link href="{$skin_path}/js/lightgallery/css/lightgallery.css" rel="stylesheet"> <div id="carousel-example-generic" class="carousel slide section clearfix" data-ride="carousel" style="max-height:700px; margin-top:10px; overflow:hidden;"> <!-- 大圖切換 --> <div class="carousel-inner demo-gallerylist-unstyled row" id="lightgallery" role="listbox"> {loop $archive['pics'] $i $pic} <div class="item img-auto{if $i==1} active{/if}" data-src="{$pic['url']}" data-sub-html="{$pic['alt']}"> <a href="" rel="lightbox['roadtrip']"><img src="{$pic['url']}" alt="{$pic['alt']}" class="img-responsive" onerror='this.src="{config::get('onerror_pic')}"' /></a> </div> {/loop} </div> <!-- 左右按鈕 --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
商品輪播必須加載js調(diào)用:
<script src="{$skin_path}/js/lightgallery/js/lightgallery.min.js"></script> <script src="{$skin_path}/js/lightgallery/js/lg-pager.min.js"></script> <script src="{$skin_path}/js/lightgallery/js/lg-fullscreen.min.js"></script> <script src="{$skin_path}/js/lightgallery/js/lg-zoom.min.js"></script> <script src="{$skin_path}/js/lightgallery/js/lg-hash.min.js"></script> <script> lightGallery(document.getElementById('lightgallery')); </script>
用 CmsEasy 助您「輕松搭建」企業(yè)官網(wǎng)。