type 指定栏目

[基础用法]
标签:type
描述:获取指定栏目信息
用法:
{eyou:type typeid='栏目ID' empty='暂时没有数据'}
{$field.typename}
{/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"}
  • {$field.typename}
  • {/eyou:type}
    网站前端显示效果(css样式请自行填充)

    【更多示例】
    -------------------------------示例1--------------------------------
    描述:输出单页模型栏目的详细内容
    {eyou:type typeid='10' type='self' addfields='content'}
    {$field.typename}
    {$field.content|html_msubstr=###,0,250}…
    {/eyou:type}
    文档最后更新时间:2023-10-23 17:23:32

    文档
    目录

    深色
    模式

    切换
    宽度