@Component public class PublishCategoryDirective extends AbstractTaskDirective
参数列表
id
:分类id
ids
:多个分类id
pageIndex
:当前页码,默认值1
totalPage
:最大页码,为空时则只生成当前页
返回结果
map
map类型,键值内容id,值为生成结果
<@task.publishCategory id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishCategory>
<script> $.getJSON('${site.dynamicPath}api/directive/task/publishCategory?id=1&appToken=接口访问授权Token', function(data){ console.log(data); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private CmsCategoryService |
service |
private TemplateComponent |
templateComponent |
siteComponent
log
构造器和说明 |
---|
PublishCategoryDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
execute, getApp, getSite
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private TemplateComponent templateComponent
private CmsCategoryService service
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException