@Component public class IndexContentDirective extends AbstractTaskDirective
参数列表
id
:内容id,ids为空时有效
ids
:多个内容id
使用示例
<@task.indexContent id=1><</@task.indexContent>
<script> $.getJSON('${site.dynamicPath}api/directive/task/indexContent?id=1&appToken=接口访问授权Token', function(data){ console.log(data.page.totalCount); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private CmsContentService |
service |
siteComponent
log
构造器和说明 |
---|
IndexContentDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
execute, getApp, getSite
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private CmsContentService service
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException