类 CmsCommentDirective

所有已实现的接口:
Directive, HttpDirective, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

@Component public class CmsCommentDirective extends AbstractTemplateDirective
comment 评论查询指令

参数列表

parameter list

パラメータリスト

  • replaceSensitive:替换敏感词, 默认为true
  • id:评论id,结果返回object CmsComment
  • ids: 多个评论id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)

使用示例

usage example

使用例

<@cms.comment id=1>${object.text}</@cms.comment>

<@cms.comment ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.comment>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/comment?id=1&appToken=接口访问授权Token', function(data){
     console.log(data.text);
   });
   </script>
 
  • 字段详细资料

  • 构造器详细资料

    • CmsCommentDirective

      public CmsCommentDirective()
  • 方法详细资料