类 PublishContentDirective

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

@Component public class PublishContentDirective extends AbstractTaskDirective
publishContent 发布分类静态页面指令

参数列表

parameter list

パラメータリスト

  • id:内容id
  • ids:多个内容id,id为空时有效

返回结果

return result

戻り値

  • mapmap类型,键值内容id,值为生成结果

使用示例

usage example

使用例

<@task.publishContent id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishContent>

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

  • 构造器详细资料

    • PublishContentDirective

      public PublishContentDirective()
  • 方法详细资料

    • execute

      public void execute(RenderHandler handler) throws IOException, freemarker.template.TemplateException
      参数:
      handler -
      抛出:
      IOException
      freemarker.template.TemplateException