{$eyou.field.typeid|GetTotalArc=###}當前 {$eyou.field.typeid=1|GetTotalArc=###}指定ID
{eyou:type type='self'} {$field.id|gettoptype=###,typename} {/eyou:type}
{$eyou.field.content}
{eyou:channel type="son" currentstyle="active"} <a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a> {/eyou:channel}
{eyou:channel type="self" currentstyle="active"} <a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a> {/eyou:channel}
{eyou:list pagesize='20' titlelen='40'} {eyou:eq name='$i' value='1'}<!--判斷開始--> <li>img src="{$field.litpic}"><a href="{$field.arcurl}" title="{$field.title}">{$field.title}</a</li><!--第一條--> {else /}<!--判斷第一條結束--> <li><a href="{$field.arcurl}" title="{$field.title}">{$field.title}</a></li><!--余下條數--> {/eyou:eq}<!--判斷結束--> {/eyou:list}
{eyou:gt name="$eyou.field.has_children" value="0"}有則顯示{/eyou:gt}
gt 大于 greater than
{$eyou.field.typeid|GetTotalArc=###}
統計欄目文章數 — GetTotalArc(當前欄目ID)
{eyou:channel type="first" currentstyle="active"} {eyou:eq name='$eyou.field.grade' value='2'} {eyou:type typeid='$eyou.field.typeid' id='field1'} {eyou:eq name='$field1.parent_id' value='$field.id'} {eyou:assign name='$field.currentstyle' value='active' /} {/eyou:eq} {/eyou:type} {/eyou:eq} <li> <a href="{$field.typeurl}" class="{$field.currentstyle}">{$field.typename}</a> </li> {/eyou:channel} ---------------------------------------------------------- {eyou:channel type='sonself' currentstyle="active"} <li> <a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a> </li> {/eyou:channel}
{eyou:list} {eyou:eq name='$field.is_recom' value='1'} <span>{$field.is_recom}</span> {/eyou:eq} {/eyou:list}
推薦:is_recom
特薦:is_special
頭條:is_head
<!--標簽頁seo標題--> <title>{$eyou.field.seo_title}_標簽頁_{eyou:global name="web_name" /}</title> <!--標簽頁seo描述--> <meta name="description" content="{$eyou.field.seo_description}" /> <!--標簽頁seo關鍵詞--> <meta name="keywords" content="{$eyou.field.seo_keywords}" />
{$field.downcount}
<!-- 收藏代碼開始 --> <a href="javascript:void(0);" id="ey_1595557091" onclick="ey_1595557091(this);" data-html="已收藏">加入收藏</a> {:hookexec('Collection/Collection/show')} <!-- 收藏代碼結束 -->
需要購買插件
{eyou:memberinfos mid='$field.users_id' id='users'} <img src="{$users.head_pic}" class="radius-big ans-user-head float-left" alt="{$users.nickname}"> {$users.hidden} {/eyou:memberinfos}
{eyou:sppurchase id='field' currentstyle='btn-danger'} <a class="" href="JavaScript:void(0);" {$field.ShopAddCart}>加入購物車(或者圖文字體)</a> {$field.hidden} {/eyou:sppurchase}
<!-- 分類折疊手風琴菜單 開始 --> <div class="subnavbox bg-white radius"> <h2 class="bg-blue text-white">{eyou:channelartlist typeid='$eyou.field.typeid|gettoptype=###,typeid'}{eyou:field name='typename' /}{/eyou:channelartlist}</h2> <!--當前欄目下二級欄目調用--> {eyou:channel type="first" currentstyle="active"} {eyou:eq name='$eyou.field.grade' value='2'} {eyou:type typeid='$eyou.field.typeid' id='field1'} {eyou:eq name='$field1.parent_id' value='$field.id'} {eyou:assign name='$field.currentstyle' value='current' /} <!--current對應樣式中的display:block--> {/eyou:eq} {/eyou:type} {/eyou:eq} <div class="{$field.currentstyle}dd {$field.currentstyle}dt suboneNav">{$field.typename}</div> <!--當前欄目下三級欄目調用--> {eyou:notempty name="$field.children"} <ul class="cur-bg {$field.currentstyle}"> {eyou:channel name="$field.children" id="field2"} <li><a href="{$field2.typeurl}" class="{$field2.currentstyle}">{$field2.typename}{$field2.typeid}</a> </li> {/eyou:channel} </ul> {/eyou:notempty} {/eyou:channel} </div> <!-- 分類折疊手風琴菜單 結束 -->
CSS和JS代碼可以點此鏈接獲取:https://www.tbadc.com/coding/559.html
<!-- 一級欄目名稱 --> <h1>{eyou:channelartlist typeid='$eyou.field.typeid|gettoptype=###,typeid'}{eyou:field name='typename' /}{/eyou:channelartlist}</h1> <!--二級欄目開始--> {eyou:channel type="first" currentstyle="active"} {eyou:eq name='$eyou.field.grade' value='2'} {eyou:type typeid='$eyou.field.typeid' id='field1'} {eyou:eq name='$field1.parent_id' value='$field.id'} {eyou:assign name='$field.currentstyle' value='current' /} <!--current對應樣式中的display:block--> {/eyou:eq} {/eyou:type} {/eyou:eq} <h2 class="{$field.currentstyle}">{$field.typename}</h2><!-- 二級欄目名稱 --> <!--三級欄目開始--> {eyou:notempty name="$field.children"} {eyou:channel name="$field.children" id="field2"} <h3><a href="{$field2.typeurl}" class="{$field2.currentstyle}">{$field2.typename}{$field2.typeid}<!-- 三級欄目名稱 --></a></h3> {/eyou:channel} {/eyou:notempty} {/eyou:channel}
可以參考http://www.ncux.cn/xingyedongtai/204.html做手風琴折疊菜單
<a href="{$eyou.field.typeid|gettoptype=###,'typeurl'}" title="{$eyou.field.typeid|gettoptype=###,'typename'}" {eyou:eq name='$eyou.field.typeid' value='$eyou.field.typeid|gettoptype=###,typeid'}class="active"{/eyou:eq}> 全部 </a>
https://www.tbadc.com/coding/
<a href="{$eyou.field.typeid|gettoptype=###,'typeurl'}"> {$eyou.field.typeid|gettoptype=###,'typename'} </a>
頂級欄目圖片: “{$eyou.field.typeid|gettoptype=###,'litpic'}“
<a href="{$eyou.field.ptypeurl}">{$eyou.field.ptypename}</a>
上級欄目ID:{$eyou.field.ptypeid}
上級欄目鏈接:{$eyou.field.ptypeurl}
上級欄目名稱:{$eyou.field.ptypename}
type="self" self表示同級
<a href="{$eyou.field.typeurl}">{$eyou.field.typename}</a>
{eyou:memberinfos mid='$field.users_id' id='users'} 會員昵稱:{$users.nickname} 會員頭像:<img src="{$users.head_pic}" width='50' height='50' /> {$users.hidden} {/eyou:memberinfos}
適用1.47+版本
{eyou:list} <a href="{$field.arcurl}">{$field.title}</a> {eyou:arcview aid='$field.aid' id='view'} {eyou:volist name="$view.file_list" id='vo'} <a href="{$vo.downurl}" title="{$vo.title}">下載</a> {/eyou:volist} {/eyou:arcview} {/eyou:list}
arclist與list都可以
{eyou:list pagesize='12' id='field'} {eyou:arcview id='field2'} {eyou:volist name="$field2.image_list" id='field3'} <img src="{$field3.image_url}" alt="{$field3.intro}"> {/eyou:volist} {/eyou:arcview} {/eyou:list}
{eyou:list} 標題:{$field.title} 閱讀數:{$field.click} 標簽:{eyou:tag sort='now' getall='0' row='10' id='field2'} <a href='{$field2.link}' class="tag">{$field2.tag</a>{/eyou:tag} {/eyou:list}
關注是要注意id='field2',也可用于arclist指定ID,如:
{eyou:arclist row='5' titlelen='80' }{eyou:tag sort='now' getall='0' row='10' id='field2'}<a href='{$field2.link}'>{$field2.tag}</a>{/eyou:tag}{/eyou:arclist}
sort='' 標簽排序方式
sort='new' 按最新排序
sort='rand' 隨機排序
sort='week' 按周統計排序
sort='month' 按月統計排序
sort='hot' 按點擊數排序
sort='total' 按文檔數排序
{eyou:tag getall='1' row='50' sort='hot'} <a href='{$field.link}'>{$field.tag}</a> {/eyou:tag}
getall='' 獲取類型,0為當前內容頁TAG標記,1為獲取全部TAG標記
{eyou:arclist addfields='content' } <span>{$field.content}</span> {/eyou:arclist}
addfields='content' 為調取文章內容的標簽屬性,必加在arclist里
{$field.content} 為調取文章內容不過濾樣式的標簽。
{$field.content|html_msubstr=###} 為調取文章內容過濾樣式的標簽。
{$field.content|html_msubstr=###,0,155} 為調取文章內容過濾樣式并截取155個字符的標簽。
{$field.seo_description}
{eyou:eq name='$field.is_litpic' value='1'} <img src="{$field.litpic}"> {/eyou:eq}
可以放在list和arclist文檔列表內,可以結合{eyou:else/}