易优CMS文章标题添加置顶标签

效果如下

易优CMS文章标题添加置顶标签(图1)

实现逻辑:直接在arclist或者list标签下调用当前文档对应的属性值

is_head头条文章
is_special 特荐
is_top 置顶
is_recom推荐
is_roll滚动
is_slide幻灯

代码如下

          {eyou:list pagesize='9' orderby='add_time' flag="a"}
             <li>
                 <a href="{$field.arcurl}" class="box">
                    <p class="pic"><img src="{$field.litpic}" /></p>
                    <div>
                       <p class="l1">
                        {eyou:if condition='($field.is_special == 1)'}
                            <span class="jxuan" style="width:45px;height:20px;background:rgba(255,85,0,1);border-radius:4px;color:white;font-size:12px;display:inline-block;text-align:center;line-height:23px;float:left;margin-right:5px;">特荐</span>
                        {/eyou:if}
                        {$field.title}
                    </p>
                    <p class="l2">
                        {$field.seo_description|html_msubstr=###,0,80,true}
                    </p>
                    <p class="bar">
                        <em class="c"><i class="fa fa-bookmark-o"></i>{$field.typename}</em> 
                        <em class="time"><i class="fa fa-clock-o"></i>{$field.add_time|MyDate='Y-m-d',###}</em> 
                    </p>
                     </div>
                 </a>
             </li>
         {/eyou:list}


赞(0) 打赏
未经允许不得转载:易优CMS » 易优CMS文章标题添加置顶标签

评论 抢沙发

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏