在使用Fastadmin做网站开发的时候,每次都去查官方手册,其实也是一件挺麻烦的事,图锐在这里将常用的标签语法以及心得做个记录,以备不时之需!

  ①分类文章列表调用:

{cms:arclist id="item" cache="false" channel="61" addon="id,content" orderby="weigh"}
{$item.title}
{$item.url}
{$item.image}
{$item.content}
{/cms:arclist}

PS:如果需要调用{$item.content},则一定需要使用 addon="id,content",并且同时配合channel或者model参数

②分类信息调用方法:

{cms:channellist id="channel" type="son" typeid="$__CHANNEL__.id"}
    //这里面可以调用cms_channel表的所有字段数据及其它扩展信息
    {$channel.name}
    {$channel.id}
    
    //栏目组合链接
    {$channel.textlink}
    //栏目链接
    {$channel.url}
    //是否有缩略图
    {$channel.hasimage}
    //图片组合链接
    {$channel.imglink}
    //图片HTML
    {$channel.img}
{/cms:channellist}

③在pagelist中调动content的方法:
在pagelist标签中不支持使用content字段,如果你一定要使用,可以修改addons/cms/controller/Channel.php第119行的->field('id,content', true, config('database.prefix') . $model['table'], 'n'),把content移除。

更多信息,可以查看:https://ask.fastadmin.net/article/12232.html

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。