类 CmsLanguageListDirective

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

@Component public class CmsLanguageListDirective extends AbstractTemplateDirective
languageList 数据字典数据列表

参数列表

  • code:字典id,为空时返回空结果

返回结果

使用示例

<@cms.LanguageList><#list list as a>${a.name}<#sep>,</#list></@cms.LanguageList>

<script>
 fetch('${site.dynamicPath}api/directive/cms/languageList').then(res => res.json()).then(data=>{
   console.log(data);
 });
 </script>
 
  • 字段详细资料

  • 构造器详细资料

    • CmsLanguageListDirective

      public CmsLanguageListDirective()
  • 方法详细资料

    • execute

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