<title>{$eyou.field.seo_title}</title> <meta name="description" content="{$eyou.field.seo_description}" /> <meta name="keywords" content="{$eyou.field.seo_keywords}" />
<!--购物车组件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.field.title}
{$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|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.field.pageurl}
也就是本页文章地址,还有一个{$eyou.field.arcurl}也可以达到同样效果。
{$eyou.field.author}
{eyou:downcount /}
{$eyou.field.downcount}也可以
{eyou:arcclick /}
{$eyou.field.seo_description}
{$eyou.field.litpic}
用法:<img src="{$eyou.field.litpic}">,非编辑器上传图片
{eyou:notempty name='$eyou.field.tags'} {eyou:tag getall='0'} <a href="{$field.link}" {$field.target}>{$field.tag}</a> {/eyou:tag} {/eyou:notempty}
{$eyou.field.content}
{eyou:likearticle row='4' orderby='aid' channelid='4'} <a href='{$field.arcurl}'>{$field.title}</a> {/eyou:likearticle}
需购买相关插件
channelid='' 默认全部模型的相关文档,可以手工指定多个模型ID,用,分开,比如:channelid='1,2,3'
mytypeid='' 手工指定要限定的栏目id,如果只指定一个栏目ID表示包括所有子级栏目,如果指定多个栏目ID用,分开,表示不包含子级栏目
limit='0,12' 调用行数,默认12条,(如:limit='2,12' 表示排除前面2条,列出后面12条)
titlelen='100' 标题长度
infolen='160' 表示内容简介长度
row='100' 条数
{eyou:prenext get='pre'} <a href="{$field.arcurl}" title="{$field.title}">上一篇 : {$field.title}</a> {eyou:else /} 上一篇:没有了 {/eyou:prenext} {eyou:prenext get='next'} <a href="{$field.arcurl}" title="{$field.title}">{$field.title}</a> {eyou:else /} 下一篇:没有了 {/eyou:prenext}
{$eyou.field.typeurl}
{$eyou.field.typename}
可结合{$eyou.field.typeurl}链接
{$eyou.users.nickname}
{$eyou.field.buyurl|htmlspecialchars_decode=###}
buyurl为你的自定义字D名称
{eyou:if condition='($eyou.field.aid == $field.aid)'}class="cur"{/eyou:if}
{eyou:memberinfos mid='$eyou.field.users_id' id='users' addfields='para_3'} <img src="{$users.head_pic}" class="userimg radius-circle" /> <p class="username text-main margin-top margin-bottom">{$users.nickname}</p> {eyou:if condition="$users.para_3 !=='0'"} <p class="usedescription text-gray height-small">{$users.para_3}</p> {/eyou:if} {$users.hidden} {/eyou:memberinfos}
addfields='自定义会员字锻ID'
{eyou:volist name="$eyou.field.image_list"} {eq name='$i' value='$__LIST__|count=###'}{$i}{/eq} {/eyou:volist}
<meta name="keywords" content="{eyou:notempty name="$eyou.field.seo_keywords"} {$eyou.field.seo_keywords} {eyou:else /} {eyou:tag getall='0'}{$field.tag},{/eyou:tag}{/eyou:notempty} " />
{eyou:arclist row='10'} <a {eyou:if condition='($eyou.field.aid == $field.aid)'}class="active"{/eyou:if} href="{$field.arcurl}" title="{$field.title}">{$field.title}</a> {/eyou:arclist}
eyou.field.aid指当前内容页的ID
{$eyou.field.aid}
{eyou:volist name="$eyou.field.image_list"} <img src="{$field.image_url}" class="img-responsive" alt="{$field.intro}"/> {/eyou:volist}
{eyou:if condition='($eyou.field.attrlist_id > 0)'} {eyou:attribute type='newattr' attrid='$eyou.field.attrlist_id'} <li>{$attr.name}:{$attr.value}</li> {/eyou:attribute} {/eyou:if}
注意:这个只在商品商城中心参数才有效。
{eyou:type typeid="$eyou.field.parent_id"} <a href="{$field.typeurl}">{$field.typename}</a> {/eyou:type}
<a href="{$eyou.field.typeid|gettoptype=###,'typeurl'}"> {$eyou.field.typeid|gettoptype=###,'typename'}</a>
{eyou:volist name="$eyou.field.image_list" row='1'} <img src="{$field.image_url}"> {/eyou:volist}
row='1',也可用limit='0,1',用limit还能控制到调用图集第几张。