Class HasToolkitMethodModel

java.lang.Object
org.apache.juneau.console.freemarker.HasToolkitMethodModel
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public final class HasToolkitMethodModel extends Object implements freemarker.template.TemplateMethodModelEx
The jcHasToolkit(name) FreeMarker method: whether the current <@page toolkit=…> lists name. Lets a chrome check which toolkits are active so it can emit toolkit-specific markup.
Example:

<#if jcHasToolkit("views")> <link rel="stylesheet" href="/app/views-extras.css"> </#if>

Only toolkit= counts. Packs that cards require (for example "datatables-glue" for a type="datatables" card) are loaded but don't make jcHasToolkit return true.

Since:
10.0.0
  • Field Details

  • Method Details

    • exec

      public Object exec(List args) throws freemarker.template.TemplateModelException
      Specified by:
      exec in interface freemarker.template.TemplateMethodModel
      Specified by:
      exec in interface freemarker.template.TemplateMethodModelEx
      Throws:
      freemarker.template.TemplateModelException