-
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}" />
二級欄目名稱及列表
{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}
三級分類名稱及列表
{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: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
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條
瀑布流分頁
<div id='tagid名稱'>
{eyou:arclist typeid='欄目ID' row='10' tagid='tagid名稱'}
<a href='{$field.arcurl}'>{$field.title}</a>
{/eyou:arclist}
</div>
{eyou:arcpagelist pagesize='3' tagid='tagid名稱' tips='沒有數據了'}
<a href="javascript:void(0);" {$field.onclick}>點擊加載更多</a>
{/eyou:arcpagelist}
需要在模板文件夾建一個system的文件夾,里面建一個arclist_tagid名稱.htm的文件,將標簽上的<a href='{$field.arcurl}'>{$field.title}</a>復制進去。
row='10'為初始數據
pagesize='3' 點一次加載3條數據
這里有一個更詳細的教程:http://www.epexinri.com/coding/568.html
{$field.title}
文檔標題
{$field.title}
{$field.arcurl}
文檔鏈接
{$field.arcurl}
{$field.litpic}
文檔&欄目縮略圖
{$field.litpic}
{$field.is_litpic}
判斷文檔縮略圖
{eyou:eq name='$field.is_litpic' value='1'}
<img src="{$field.litpic}">
{/eyou:eq}
可以放在list和arclist文檔列表內,可以結合{eyou:else/}
{$field.seo_description}
文檔內容摘要
{$field.seo_description}
{$field.content}
列表調用正文內容
{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個字符的標簽。
當前欄目Tag
{eyou:tag getall='1' row='50' sort='hot'}
<a href='{$field.link}'>{$field.tag}</a>
{/eyou:tag}
getall='' 獲取類型,0為當前內容頁TAG標記,1為獲取全部TAG標記
sort='' 標簽排序方式
sort='new' 按最新排序
sort='rand' 隨機排序
sort='week' 按周統計排序
sort='month' 按月統計排序
sort='hot' 按點擊數排序
sort='total' 按文檔數排序
文檔調用Tag及閱讀數
{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: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}
<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:memberinfos mid='$field.users_id' id='users'}
會員昵稱:{$users.nickname}
會員頭像:<img src="{$users.head_pic}" width='50' height='50' />
{$users.hidden}
{/eyou:memberinfos}
適用1.47+版本