-
留言表單
{eyou:guestbookform type='default'}
<form method="POST" action="{$field.action}" {$field.formhidden} onsubmit="{$field.submit}" >
<input id="attr_1" type="text" value="" name="{$field.attr_1}" placeholder="{$field.itemname_1}">
<input id="attr_2" type="text" value="" name="{$field.attr_2}" placeholder="{$field.itemname_2}">
<textarea id="attr_3" cols="40" rows="3" name="{$field.attr_3}" placeholder="{$field.itemname_3}"></textarea>
<input type="submit" value="提交">
{$field.hidden}
</form>
{/eyou:guestbookform}
先建一個留言表單的欄目,然后編輯這個欄目,在屬性列表,新增屬性。
{$field.formhidden} 為表單支持圖片上傳屬性
{$field.submit} 為表單使用內置的JS驗證用戶輸入內容的格式
{$field.attr_1} 為表單屬性字段名稱
{$field.itemname_1} 為表單屬性提示文字
typeid='' 指定文檔ID,如果沒有指定則獲取當前留言模型的欄目ID
type='default' 默認類型,該屬性不可缺少
empty='' 當前留言版塊的表單被刪完時,顯示的文案內容
id='' 可以任意指定循環里的變量名替代field,假設id='field1',模板調用如:{$field.title} 變成 {$field1.title}
文檔內容摘要
{$field.seo_description}
由{eyou:arclist infolen='10'}或{eyou:list infolen='10'}中的infolen=''控制
當前三級折疊菜單
<!-- 分類折疊手風琴菜單 開始 -->
<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代碼可以點此鏈接獲取:http://www.epexinri.com/coding/559.html
{$i}-{$key}
自增循環+1
{eyou:list pagesize ='10' }
{$i}-{$key}
{/eyou:list}
list與arclist,flink等都可以用,當同時需要多個遞增時,也可以在list或arclist,也可以自定比如key='k',然后用{$k}輸出。
{$key}從0開始
{$i}從1開始的
{eyou:position /}
面包屑
{eyou:position/}
{eyou:type}{/eyou:type }
指定單條欄目名稱和鏈接
{eyou:type typeid='115'}
<a href="{$field.typeurl}">{$field.typename}</a>
{/eyou:type}
typeid='115'為指定欄目的ID
首頁圖集調用
{eyou:arclist typeid='1' id='field'}
{eyou:arcview id='field2'}
{eyou:volist name="$field2.image_list" id='field3'}
<img src="{$field3.image_url}" alt="{$field.intro}">
{/eyou:volist}
{/eyou:arcview}
可以用于arclist和list標簽
{$field.intro}為圖集的描述
{$field.typeurl}
指定欄目鏈接及名稱
{eyou:type typeid='欄目id'}
<a href="{$field.typeurl}">{$field.typename}</a>
{/eyou:type}
二級欄目及文檔列表
{eyou:channelartlist typeid=''}
{eyou:channel type="son"}
{$field.typename}<!-- 二級欄目名稱 -->
{eyou:arclist typeid='$field.typeid'}
<a href="{$field.arcurl}">{$field.title}</a>
{/eyou:arclist}
{/eyou:channel}
{/eyou:channelartlist}
可以指定typeid=''的ID
eyoucms如何新增自定義文檔屬性
易優如何實現發布時間顯示類似幾天前、幾小時前效果
Eyoucms列表調用產品模型相冊與圖集封面及相冊
易優cms欄目標簽調用代碼
易優cms系統公共標簽調用代碼
易優cms網站模板文件及說明
易優cms會員模板文件及說明
Eyoucms系統標簽
易優cms各種文章創建時間效果
易優cms列表頁判斷是否有圖集圖片并判斷圖片數量
易優cms列表詳情頁調用兩個關聯欄目的內容