public class SimpleFreemarkerHelper extends Object
FreemarkerHelper
of magnolia-freemarker-support or
RenderingEngine
of magnolia-rendering.
It only loads templates on the classpath and, unlike FreemarkerHelper, is simply not configurable. It does not put _any_ variables in the templateContext, so you have to add them all explicitly. This class might disappear if its current uses can be split out of core.
Constructor and Description |
---|
SimpleFreemarkerHelper(Class<?> baseClass,
boolean relative)
If relative is true, templates will be loaded from the base class' package; if false, the paths will be relative to the root of the classpath.
|
Modifier and Type | Method and Description |
---|---|
void |
render(String template,
Map<String,?> templateContext,
Writer out) |
public SimpleFreemarkerHelper(Class<?> baseClass, boolean relative)
public void render(String template, Map<String,?> templateContext, Writer out) throws IOException, freemarker.template.TemplateException
IOException
freemarker.template.TemplateException
Copyright © 2003–2020 Magnolia International Ltd.. All rights reserved.