{eyou:arcview aid='105'} {$field.title} {$field.content|html_msubstr=###,0,250} {eyou:arcview id='field2'} {eyou:volist name="$field2.image_list" id='field3' row='18' } <img src="{$field3.image_url}" alt="{$field3.intro}"> {/eyou:volist} {/eyou:arcview} {/eyou:arcview}
aid='105'为此篇文章的ID
{eyou:notempty name="$field.typelink"}target="_blank"{/eyou:notempty}
上面的代码请放在<a>里面
{eyou:if condition="$Think.cookie.home_lang =='cn'"} 我是{$Think.cookie.home_lang} {eyou:else /} 我是{$Think.cookie.home_lang} {/eyou:if}
{eyou:channel type="top" row="60" id="field" currentstyle="background:#0976dc"} {eyou:notempty name="$field.children"} <li class="menu"><a href="javacript:void(0);" style="{$field.currentstyle}">{$field.typename}</a> <ul class="sub"> {eyou:channel name="$field.children" row="100" id="field1"} <li><a href="{$field1.typeurl}">{$field1.typename}</a> </li> {/eyou:channel} </ul> <span></span> </li> {eyou:else /} <li><a href="{$field.typeurl}" style="{$field.currentstyle}">{$field.typename}</a></li> {/eyou:notempty} {/eyou:channel}
{eyou:channelartlist} <h1><a href="{eyou:field name='typeurl' /}">-A、{eyou:field name='typename' /}</a></h1> {eyou:channel type="son" id='field'} {eyou:empty name="$field.typelink"} <h2><a href="{$field.typeurl}" title="{$field.typename}">--B、{$field.typename}</a></h2> {/eyou:empty} {eyou:channel name="$field.children" id='field2'} <h3><a href="{$field2.typeurl}" title="{$field2.typename}">---C、{$field2.typename}</a></h3> {eyou:arclist typeid='$field2.typeid' noflag='j' id='field3'} <h4><a href='{$field3.arcurl}'>----D、{$field3.title}</a></h4> {eyou:tag getall='0' typeid='$field3.typeid' id='field4'} <h5><a href='{$field4.link}'>-------E、{$field4.tag}、</a></h5> {/eyou:tag} {/eyou:arclist} {/eyou:channel} {/eyou:channel} {/eyou:channelartlist}
<a href="{eyou:diyurl type='tags'}">TAG标签主页</a>
type='' 内置URL分类
type='tags' TAG标签主页URL
type='login' 登录链接
type='reg' 注册链接
type='sindex' 搜索主页链接
充值:{eyou:url link='user/Pay/pay_account_recharge' /}
等级:{eyou:url link='user/Level/level_centre' /}
投稿:{eyou:url link='user/UsersRelease/article_add' /}
<!--tag标签调用--> {eyou:channelartlist} <h1><a href="{eyou:field name='typeurl' /}" class="text-green">-A、{eyou:field name='typename' /}</a></h1> {eyou:channel type="son" id='field'} {eyou:empty name="$field.typelink"} <h2><a href="{$field.typeurl}" title="{$field.typename}">--B、{$field.typename}</a></h2> {/eyou:empty} {eyou:channel name="$field.children" id='field2'} <h3><a href="{$field2.typeurl}" title="{$field2.typename}">---C、{$field2.typename}</a></h3> {eyou:arclist typeid='$field2.typeid' noflag='j' id='field3'} <p><a href='{$field3.arcurl}'>----D、{$field3.title}</a></p> {eyou:tag getall='0' typeid='$field3.typeid' id='field4'} <p><a href='{$field4.link}'>-------E、{$field4.tag}、</a></p> {/eyou:tag} {/eyou:arclist} {/eyou:channel} {/eyou:channel} {/eyou:channelartlist} <!--tag标签调用-->
{eyou:assign name='pid' value='$eyou.field.pid'/} {eyou:adv pid='$pid' row='20'}{/eyou:adv}
{eyou:arclist} {eyou:memberinfos mid='$field.users_id' id='users' addfields='para_3'} <img src="{$users.head_pic}" class="userface radius-circle"/>{$users.nickname} {$users.para_3} {$users.hidden} {/eyou:memberinfos} {/eyou:arclist}
{eyou:php} $UsersData = session('users'); $userid=$UsersData['users_id']; {/eyou:php} {eyou:empty name='$userid' /} 未登录见到的提示信息 {eyou:else/} 登录后见到的信息 {/eyou:empty}
{eyou:user type='info'} <div id="{$field.id}"> <span id="{$field.level_name}"></span> {$field.hidden} </div> {/eyou:user}
登录后显示
{if condition="$vo.value == 属性值"}checked{/if}
{eyou:notempty name="$field.typelink"}target="_blank"{/eyou:notempty}
{eyou:eq name='$field.is_head' value='1'} <span>[头条]</span> {/eyou:eq}
is_head:头条
is_recom:推荐
is_special:特荐
is_litpic:判断是否有图片
<!--tag标签调用--> {eyou:channelartlist typeid='2,3'} {eyou:channel type="son" id='field2'} {eyou:notempty name='$field2.children' /} <!-- 如果有三级 --> <p> <h2>{$field2.typename}</h2> {eyou:channel name="$field2.children" id='field3'} {eyou:tag getall='1' typeid='$field3.typeid'} <span><a href='{$field.link}'>{$field.tag}</a></span> {/eyou:tag} {/eyou:channel} </p> {eyou:else /} <p> <h2>{$field2.typename}</h2> {eyou:tag getall='1' typeid='$field2.typeid'} <span><a href='{$field.link}'>{$field.tag}</a></span> {/eyou:tag} {/eyou:notempty} </p> {/eyou:channel} {/eyou:channelartlist}
{eyou:channelartlist typeid='2,3'} {eyou:channel type="son" id='field2'} <!-- 如果有三级 --> {eyou:notempty name='$field2.children' /} <p> <h2>{$field2.typename}{$field2.typeid}</h2> {eyou:channel name="$field2.children" id='field3'} {eyou:tag getall='1' typeid='$field3.typeid'} <span><a href='{$field.link}'>{$field.tag}</a></span> {/eyou:tag} {/eyou:channel} </p> {eyou:else /} <p> <h2>{$field2.typename}{$field2.typeid}</h2> {eyou:tag getall='1' typeid='$field2.typeid'} <span><a href='{$field.link}'>{$field.tag}</a></span> {/eyou:tag} {/eyou:notempty} </p> {/eyou:channel} {/eyou:channelartlist}
{eyou:channelartlist typeid='2,3'}可以指定多个栏目,分二级或三级栏目情况,可以放在index_tags.htm或指定页面。
{eyou:notempty name='$eyou.field.has_children' /} <!-- 有子栏目时显示的内容 --> {eyou:else /} <!-- 没有子栏目时显示的内容 --> {/eyou:notempty}
{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:php} $UsersData = session('users'); $userid=$UsersData['users_id']; {/eyou:php} {eyou:empty name='$userid' /} 未登录见到的提示信息 {eyou:else/} 登录后见到的信息 {/eyou:empty}
加技术微信沟通更方便