admin管理员组

文章数量:1566222

2024年7月17日发(作者:)

头部统一设置:

分类:

<@_category id=id>

<#assign category=object/>

<#assign attribute=getCategoryAttribute(id)/>

内容:

<@_content id=id>

<#assign content=object/>()

<#assign attribute=getContentAttribute(id)/>

a>${a}<#sep>,">

as

${}

Banner的动态导入:

例子:

添加元数据

利用模板帮助--------->扩展字段可以取出字段

页面的页面管理可以给元数据赋值:

当前位置

测试接口

localhost:8082/

1.模板创建 分类创建 :

/introduction/2017/03-25/

2.网站创建: /introduction/2017/03-25/

静态变动态

(1) 文件路径的修改: ${th}

(2) Logo的添加: logo使用的地方很多,所以保存为站点配置

(3) 带文章的分类

动态加载导航:

动态加载内容:

添加子分类重用模板:(cms的添加子分类有bug,需要手动添加)

修改url链接

<#if ds?has_content>

  • ${}

  • <@_categoryList parentId=>

    <#list as a>

  • ${}

  • <#else>

    <@_category id=Id>

  • ${}

  • <@_categoryList parentId=Id typeId=typeId

    allowContribute=allowContribute pageIndex=pageIndex count=count>

    <#list as a>

  • ${}

  • (4) 公共区块(头部导航,尾部联系我们等): 18min ------------页面片段(静态)

    (5) 新闻: 35min

    上传模板,修改代码,title使用比较好,可以在seo修改.

    <@_category id=id>

    <#assign category=object/>

    <#-- 分类扩展数据(参数为分类ID) -->

    <#assign attribute=getCategoryAttribute(id)/>

    加入分类,注意路径:

    使用内容指令,修改参数:

    <#-- categoryId:分类ID,containChild:包含子分类内容,modelId:模型ID,parentId:

    父内容ID,onlyUrl:["true":仅外链,"false":非外链,默认全部],hasImages:["true":仅图

    集,"false":非图集,默认全部],hasFiles:["true":仅带附件,"false":非带附件,默认全

    部],orderField:排序字段["scores":分数,"comments":评论,"clicks":点击,"publishDate":

    发布日期,默认排序+发布日期倒序],orderType:排序类型["asc":正序,"desc":倒

    序],pageIndex:页码,count:每页数据条数 -->

    <@_contentList categoryId=id containChild=containChild modelId=modelId

    parentId=parentId onlyUrl=onlyUrl hasImages=hasImages hasFiles=hasFiles

    orderField=orderField

    count=ze>

    orderType=orderType pageIndex=pageIndex

    <@_contentList categoryId= containChild=true

    pageIndex=pageIndex count=ze>

    <#list as a>

    <#if !age>

    上一页

    <#else>

    上一页

    <#assign start=1/>

    <#if (dex-5) gt start>

    <#assign start=dex-4/>

    <#assign end=age/>

    <#if (dex+5) lt end>

    <#assign end=dex+4/>

    <#if start gt 1>

    1 ...

    <#d as n>

    <#if n=dex>

    ${n}

    <#else>

    ${n}

    <#if end lt age>

    ...

    href="?id=${id}&pageIndex=${age}">${age}

    <#if !ge>

    下一页

    <#else>

    下一页

    <@_contentList>

    在分类添加模型:

    内容发布:

    内容详情页面:

    取出内容的正文:

  • ${(?no_esc)!}
  • 取出内容的图片: <#if ges>

    <@_contentFileList contentId= image=true count=2>

    <#list as i>

    " alt="${}"/>

    父分类遍历子分类内容

    <@_categoryList parentId=>

    <#list as x>

    <@_contentList categoryId=>

    <#list as a>

    <@_contentList categoryId=4 containChild=true><#list as a>

    <#-- 内容扩展数据(参数为内容Id) -->

    <#assign attribute=getContentAttribute()/>

    href="${!}">${}${ption}${(?no_esc)!}${

    ath+}

    <#-- categoryId:分类ID,containChild:包含子分类内容,modelId:模型ID,parentId:

    父内容ID,onlyUrl:["true":仅外链,"false":非外链,默认全部],hasImages:["true":仅图

    集,"false":非图集,默认全部],hasFiles:["true":仅带附件,"false":非带附件,默认全

    部],orderField:排序字段["scores":分数,"comments":评论,"clicks":点击,"publishDate":

    发布日期,默认排序+发布日期倒序],orderType:排序类型["asc":正序,"desc":倒

    序],pageIndex:页码,count:每页数据条数 -->

    <@_contentList categoryId=4 containChild=true>

    <#list as a>

    <#assign attribute=getContentAttribute()/>

    href="${!}">${}${ption}${(?no_esc)!}${

    ath+}

    <#-- orderField:排序字段["size":大小,"click":点击,默认排序字段顺序],orderType:排

    序类型["asc":正序,"desc":倒序],pageIndex:页码,count:每页数据条数 -->

    <@_content ids=[7,9]><#list map?keys as k>

    href="${map[k].url!}">${map[k].title}<#sep>,

    本文标签: 分类内容默认数据