首页 > 其他分享 >易优CMS模板标签type指定栏目输出单页模型栏目的详细内容

易优CMS模板标签type指定栏目输出单页模型栏目的详细内容

时间:2024-07-22 14:51:44浏览次数:9  
标签:栏目 易优 typename 单页 指定 field eyou type

[基础用法]标签:type描述:获取指定栏目信息用法: {eyou:type typeid='栏目ID' empty='暂时没有数据'} <a href="{$field.typeurl}">{$field.typename}</a> {/eyou:type}  属性: typeid='' 指定栏目ID,如果没有指定则获取当前列表页的栏目ID type='self' 表示当前栏目type='top' 表示当前栏目最顶级的一级栏目 addfields='content' 自定义字段名,多个字段以逗号隔开 empty='' 没有数据时显示的文案 id='' 可以任意指定循环里的变量名替代field,假设id='field1',模板调用如:{$field.typename} 变成 {$field1.typename}涉及标字段: 请查阅易优数据字典,找到表名 ey_arctype

-------------------------------效果展示--------------------------------
调用指定栏目名称链接
模板调用代码
{eyou:type typeid="1"} <li> <a href="{$field.typeurl}">{$field.typename}</a> </li> {/eyou:type} 网站前端显示效果(css样式请自行填充)
 
  【更多示例】 -------------------------------示例1-------------------------------- 描述:输出单页模型栏目的详细内容 {eyou:type typeid='10' type='self' addfields='content'} <a href="{$field.typeurl}">{$field.typename}</a> <!-- 截取内容250个字符串长度 start --> <span>{$field.content|html_msubstr=###,0,250}&hellip;</span> <!-- 截取内容250个字符串长度 end --> {/eyou:type}

 

标签:栏目,易优,typename,单页,指定,field,eyou,type
From: https://www.cnblogs.com/hwrex/p/18315988

相关文章