# 杭州創意模板系統(模板制作)
## 模板要求
必須包括的文件:
|文件名|文件說明|
| --- | --- |
|default.jpg|后臺預覽用,模板的縮略截圖|
|default_index.html|模板首頁(網站首頁)|
|aboutus_index.html|關于我們頁面|
|contactus_index.html|聯系我們頁面|
|news_index.html|新聞頁面|
|news_cate.html|新聞分類|
|news_details.html|新聞詳情|
|images_index.html|圖片頁面|
|images_cate.html|圖片分類|
|images_details.html|圖片詳情|
|products_index.html|產品首頁|
|products_cate.html|產品分類|
|products_details.html|產品詳情|
## 模板參數(整站有效)
|參數名稱|參數說明|
| --- | --- |
|{$template}|模板路徑(系統會自動定位到模板根目錄)|
|{$index}|網站首頁url|
|{$news}|新聞首頁url|
|{$newscate}|新聞分類url|
|{$newsdetails}|新聞詳情url|
|{$images}|圖片首頁url|
|{$imagescate}|圖片分類url|
|{$imagesdetails}|圖片詳情url|
|{$products}|產品首頁url|
|{$productscate}|產品分類url|
|{$productsdetails}|產品詳情url|
|{$aboutus}|關于我們url|
|{$contactus}|聯系方式url|
## 客戶內容標簽(整站有效)
|參數名稱|參數說明|
| --- | --- |
|{$customer['tplogo']}|頂部logo圖片地址|
|{$customer['btlogo']}|底部logo圖片地址|
|{$customer['qrcode']}|二維碼圖片地址|
|{$customer['title']}|網站標題/客戶標題|
|{$customer['url']}|網址|
|{$customer['tel']}|電話|
|{$customer['fax']}|傳真|
|{$customer['email']}|郵箱|
|{$customer['qq']}|QQ|
|{$customer['address']}|地址|
|{$customer['coordinate']}|地圖坐標|
|{$customer['aboutus']}|關于我們|
|{$customer['contactus']}|聯系方式|
## 客戶內容banner標簽(首頁default.html有效)
{$customer['banner']} 具體使用請參數下面的banner展示方式
客戶內容banner標簽參數(該標簽只在首頁default.html有效,其它頁面無效)
|參數名稱|參數說明|
| --- | --- |
|{$banner_name}|banner名稱|
|{$banner_name}|banner圖片地址|
## 使用方法
~~~
<!DOCTYPE html>
<html lang="zh_cn">
<head>
<!--使用了內容標簽{$customer['title']}-->
<title>網站首頁 - {$customer['title']}</title>
<!--使用了模板參數{$template}-->
<script src="{$template}/styles/base.js"></script>
</head>
<body>
<!--導航展示-->
<!--使用了模板參數-->
<ul class="nav navbar-nav">
<li class="<?php echo ('[active]'=='index'?'active':''); ?>"><a href="{$index}">網站首頁</a></li>
<li class="<?php echo ('[active]'=='aboutus'?'active':''); ?>"><a href="{$aboutus}">關于我們</a></li>
<li class="<?php echo ('[active]'=='news'?'active':''); ?>"><a href="{$news}">新聞動態</a></li>
<li class="<?php echo ('[active]'=='contactus'?'active':''); ?>"><a href="{$contactus}">聯系方式</a></li>
</ul>
<!--banner標簽展示 banner是一個數組,需要循環讀出-->
<div class="carousel-inner" role="listbox">
{volist name="customer['banner']" id="vo" key="k"}
<div class="item {$k==1?'active':''}">
<img src="{$vo['banner_filepath']}" alt="{$vo['banner_name']}">
<div class="carousel-caption">{$vo['banner_name']}</div>
</div>
{/volist}
</div>
</body>
</html>
~~~