-
title / keywords / description
標題 / 關鍵詞 / 描述
<title>{$eyou.field.seo_title}</title>
<meta name="description" content="{$eyou.field.seo_description}" />
<meta name="keywords" content="{$eyou.field.seo_keywords}" />
title / keywords / description
文章標題 / 關鍵詞 / 描述
<title>{$eyou.field.seo_title}</title>
<meta name="keywords" content="{$eyou.field.seo_keywords}" />
<meta name="description" content="{$eyou.field.seo_description}" />
title / keywords / description
標題 / 關鍵詞 / 描述
<title>{eyou:global name='web_title' /}_{eyou:global name='web_name' /}</title>
<meta name="description" content="{eyou:global name='web_description' /}" />
<meta name="keywords" content="{eyou:global name='web_keywords' /}" />
{eyou:global name='web_name' /}
網站名稱
{eyou:global name='web_name' /}
購物車組件(完整)
<!--購物車組件start-->
{eyou:sppurchase id='field' currentstyle='btn-danger'}
<!--價格標簽-->
?<div class="ey-price"><span>¥{$field.users_price}</span></div>
<!--商品參數-->
{eyou:volist name="$field.ReturnData" id='field2'}
<div class="row">
<label class="col-sm-7">{$field2.spec_name}</label>
<div class="col-sm-10">
{eyou:volist name="$field2.spec_value" id='field3'}
<a href="JavaScript:void(0);" {$field3.SpecData} class="btn {$field3.SpecClass}">{$field3.spec_value}</a>
{/eyou:volist}
</div>
</div>
{/eyou:volist}
?<!--商品數量選擇-->
<div class="ey-number">
<label>數量</label>
<div class="btn-input">
<button class="layui-btn" {$field.ReduceQuantity}>-</button>
<input type="text" class="layui-input {$field.UpdateQuantity}>
<button class="layui-btn" {$field.IncreaseQuantity}>+</button>
</div>
</div>
<!--庫存數量,后臺可控制是否顯示-->
?<span {$field.stock_show}>庫存量:{$field.stock_count} 件</span>
<!--購買和加入購物車按鈕-->
<div class="ey-buyaction">
<a class="ey-joinin" href="JavaScript:void(0);" {$field.ShopAddCart}>加入購物車</a>
<a class="ey-joinbuy" href="JavaScript:void(0);" {$field.BuyNow}>立即購買</a>
</div>
<!--別漏掉這個-->
{$field.hidden}
{/eyou:sppurchase}
<!--購物車組件end-->
組件樣式修改路徑:public/static/common/css/shopcart.css,記得先備份。
二級欄目名稱及列表
{eyou:channel type="first"}
{$field.typename}<!-- 二級分類名稱 -->
{eyou:arclist typeid='$field.typeid' titlelen='68' row='9'}
<a href="{$field.arcurl}">{$field.title}</a>
{/eyou:arclist}
{/eyou:channel}
一級菜單導航
<li class="{eyou:eq name='$Request.param.m' value='Index'}hover{/eyou:eq}">
<a href="{eyou:global name='web_cmsurl' /}">首頁</a>
</li>
{eyou:channel type="top" id="field" currentstyle="active"}
<li class="{$field.currentstyle}">
<a href="{$field.typeurl}">{$field.typename}</a></li>
{/eyou:channel
三級分類名稱及列表
{eyou:channel type="first"}
<h2>{$field.typename}</h2>
<!-- 這是二級分類名稱 -->
{eyou:notempty name="$field.children"}
{eyou:channel name="$field.children" id="field2"}
<h3>{$field2.typename}{$field2.typeid}</h3>
<!-- 這是三級分類名稱 -->
{eyou:arclist typeid='$field2.typeid' titlelen='10' id="field3" addfields='content'}
<!-- 以下是三級分類下的文章 -->
<a href="{$field3.arcurl}">
<img src="{$field3.litpic}" alt="{$field3.title}">{$field3.title}</a >
{/eyou:arclist}
{/eyou:channel}
{/eyou:notempty}
{/eyou:channel}
{$eyou.field.title}
文章內容標題
{$eyou.field.title}
{eyou:list}{/eyou:list}
一級分類列表
{eyou:list titlelen='30' infolen='10' pagesize='20'}
<a href='{$field.arcurl}'>{$field.title}</a>
<span>{$field.seo_description}</span>
{/eyou:list}
titlelen='30' 標題字數
pagesize='20' 多少條為一頁
infolen='10' 描述{$field.seo_description}的字數
三級菜單導航
{eyou:channel type="first" row="60" id="field" currentstyle="hover"}
<li class="{$field.currentstyle}"><a href="{$field.typeurl}">{$field.typename}</a>
{eyou:notempty name="$field.children"}
<ul class="二級">
eyou:channel name="$field.children" row="100" id="field2"}
<li><a href="{$field2.typeurl}">{$field2.typename}</a>
{eyou:notempty name="$field2.children"}
<ul class=" 三級">
{eyou:channel name="$field2.children" row="100" id="field3"}
<li><a href="{$field2.typeurl}">{$field3.typename}</a> </li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
{/eyou:channel}
?
二級菜單導航
{eyou:channel type="first" id="field" currentstyle="hover"}
<ul class="一級">
<li class="{$field.currentstyle}"><a href="{$field.typeurl}">{$field.typename}</a>
<!--一級名稱 -->
{eyou:notempty name="$field.children"}
<ul class="二級">
eyou:channel name="$field.children" row="100" id="field2"}
<li><a href="{$field2.typeurl}">{$field2.typename}</a><li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
</ul>
{/eyou:channel}
一級菜單導航
{eyou:channel id="field" currentstyle="active"}
<li class="{$field.currentstyle}">
<a href="{$field.typeurl}">{$field.typename}</a></li>
{/eyou:channel
二級菜單導航
<li class="{eyou:eq name='$Request.param.m' value='Index'}hover{/eyou:eq}">
<a href="{eyou:global name='web_cmsurl' /}">首頁</a>
</li>
{eyou:channel type="top" row="60" id="field" currentstyle="hover"}
<li class="{$field.currentstyle}"><a href="{$field.typeurl}">{$field.typename}</a>
{eyou:notempty name="$field.children"}
<ul class="subnav">
eyou:channel name="$field.children" row="100" id="field2"}
<li><a href="{$field2.typeurl}">{$field2.typename}</a></li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
{/eyou:channel}
{$eyou.field.update_time}
文章更新時間
{$eyou.field.update_time|MyDate='Y-m-d',###}
{$eyou.field.update_time|MyDate='Y-m-d H:i:s',###}
{$eyou.field.update_time|MyDate='Y-m-d',###}
{$eyou.field.add_time}
文章發布時間
{$eyou.field.add_time|MyDate='Y-m-d H:i:s',###}
{$eyou.field.add_time|MyDate='Y-m-d H:i:s',###} 效果:2018-05-20 13:14:00
{$field.update_time|MyDate='Y-m-d',###} 效果:2018-05-20
{eyou:include file="header.htm" /}
引用頭部文件
{eyou:include file="header.htm" /}
三級菜單導航
<li class="{eyou:eq name='$Request.param.m' value='Index'}hover{/eyou:eq}">
<a href="{eyou:global name='web_cmsurl' /}">首頁</a></li>
{eyou:channel type="top" row="60" id="field" currentstyle="hover"}
<li class="{$field.currentstyle}"><a href="{$field.typeurl}">{$field.typename}</a>
{eyou:notempty name="$field.children"}
<ul class="subnav">
eyou:channel name="$field.children" row="100" id="field2"}
<li><a href="{$field2.typeurl}">{$field2.typename}</a>
{eyou:notempty name="$field2.children"}
<ul class="subnav2">
{eyou:channel name="$field2.children" row="100" id="field3"}
<li><a href="{$field2.typeurl}">{$field3.typename}</a> </li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
{/eyou:channel}
</ul>
{/eyou:notempty}
</li>
{/eyou:channel}
?
域名鏈接
{eyou:global name='web_basehost' /}
pagelist
列表分頁
{eyou:pagelist listitem='index,pre,pageno,next,end,info' listsize=‘2’ /}
listsize=2 表示 [1][2][3][4][5] 這些項的長度 - 1,再除以2得出的結果值
listitem='index,pre,pageno,next,end' 表示頁碼樣式,可以把下面的值疊加
index 首頁
pre 上一頁
pageno 頁碼
next 下一頁
end 末頁
info 共N頁 N條