當前文章ID
{$eyou.field.aid}
有關當前焦點的標簽,只有我能理解
{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.field.typeid|GetTotalArc=###}
統計欄目文章數 — GetTotalArc(當前欄目ID)
三級欄目及文檔列表
{eyou:channel type="first"}
<h2>{$field.typename}</h2>
{eyou:notempty name="$field.children"}
<ul>
{eyou:channel name="$field.children" id="field2"}
<li>
<a href="{$field2.typeurl}">{$field2.typename}</a>
{eyou:arclist typeid='$field2.typeid' titlelen='20' id="field3"}
<a href="{$field3.arcurl}">{$field3.title}</a>
{/eyou:arclist}
</li>
{/eyou:channel}
</ul>
{/eyou:notempty}
{/eyou:channel}
分別列出第二級的欄目名稱、鏈接、圖片,第三級的欄目名稱、鏈接、圖片及第三級各欄目下的文章
一比較復雜的標簽
{eyou:channelartlist typeid='4'}
{eyou:channel type='son'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}<img src="{$field.litpic}" alt="{$field.typename}"></a>
{eyou:arclist typeid='$field.typeid' titlelen='20' id="field2"}
{eyou:arcview id='field2'}
{eyou:volist name="$field2.image_list" id='field3' row='1'}
<a href="{$field2.arcurl}" target="_blank"><img src="{$field3.image_url}" alt="{$field2.title}">{$field2.title}</a>
{/eyou:volist}
{/eyou:arcview}
{/eyou:arclist}
{/eyou:channel}
{/eyou:channelartlist}?
二級分類下,輸出二級分類名稱、鏈接,圖片及二級下的文章標題、鏈接、圖片及文章下的圖集、描述。
當前欄目判斷有無子欄目
{eyou:gt name="$eyou.field.has_children" value="0"}有則顯示{/eyou:gt}
gt 大于 greater than
列表第一篇文檔與其他文檔不同樣式
{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:channel type="self" currentstyle="active"}
<a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a>
{/eyou:channel}
當前欄目調用子欄目
{eyou:channel type="son" currentstyle="active"}
<a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a>
{/eyou:channel}
判斷有無子欄目(全局)
{eyou:notempty name='$eyou.field.has_children' /}
<!-- 有子欄目時顯示的內容 -->
{eyou:else /}
<!-- 沒有子欄目時顯示的內容 -->
{/eyou:notempty}
文檔圖集
{eyou:volist name="$eyou.field.image_list"}
<img src="{$field.image_url}" class="img-responsive" alt="{$field.intro}"/>
{/eyou:volist}
Eyoucms如何設置VIP模式下載
商城判斷是否有參數
{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:eq name='$field.字段' value='1'}開的內容{eyou:else /}關的內容{/eyou:eq}
需要先在模型里增加一個自定義的開關字段
新增自定義字段&調用
判斷新增字段是否為空
{eyou:if condition="($eyou.field.自定義字段名稱 != '')"}
//如果不為空,顯示不為空的內容
{eyou:else /}
//如果為空,顯示
{/eyou:if}
以上適用內容頁,list和arclist請用:
{eyou:if condition="($field.自定義字段名稱 != '')"}
//如果不為空,顯示不為空的內容
{eyou:else /}
//如果為空,顯示
{/eyou:if}
{$eyou.field.content}
當前單頁正文
{$eyou.field.content}
返回上一級欄目名稱和鏈接
{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>