.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : CIS_FreemarkerSettings.rst * Created by : Marnix Bochove (original text) * Last update : 22-03-2021 * Updated by : Niels de Nies * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /inline-images.txt .. include:: /external-links.txt Freemarker settings ==================== MetaFactory supports multiple template engines. Since 2011 Freemarker_ is supported by MetaFactory. Freemarker is a very powerful template engine to produce source code. Like Velocity_, freemarker supports libraries-containing-macros_. To make these macro libraries available for other freemarker templates the freemarker element is used: .. rubric:: Usage .. code-block:: xml :caption: syntax :name: freemarker settings-01 :linenos: :emphasize-lines: 8,9,10,11 ... relative path to freemarker file with macro's some other path ... Each freemarkerLibary element loads a freemarker template file. The macro’s defined in this template are made available to the template engine in the specified namespace. If the template file can’t be loaded, MetaFactory returns a error and stops loading the pattern. Example of a pattern with 2 freemarker libraries defined: .. code-block:: xml :caption: example :name: freemarker settings-02 :linenos: :emphasize-lines: 8,9,10,11 ... jsf/primefaces/library/primefacesLayout.ftl universal/library/layout/tableLayout.ftl ...