类 CmsTagDirective

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

@Component public class CmsTagDirective extends AbstractTemplateDirective
tag 标签查询指令

参数列表

parameter list

パラメータリスト

  • id:标签id,结果返回object CmsTag
  • ids: 多个标签id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)

使用示例

usage example

使用例

<@cms.tag id=1>${object.name}</@cms.tag>

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

<script>
$.getJSON('${site.dynamicPath}api/directive/cms/tag?id=1', function(data){
  console.log(data.name);
});
</script>
 
  • 字段详细资料

  • 构造器详细资料

    • CmsTagDirective

      public CmsTagDirective()
  • 方法详细资料

    • execute

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