I have added some custom macros in ScreenHtmlMacros.html.ftl for general use
across the component. However, I am not able to to access it inside the ftl
templates in the application using the <@macro /> syntax. I am not sure, if it
is a namespace issue, or something else. I see that the
ScreenHtmlMacros.html.ftl file is certainly getting "auto" included in all the
output templates, but, I am not able to get the macros running. Has anybody
else also faced the same (or similar) problem?
This won't work because it's not meant to work that way.
The screen/form/etc rendering is in a separate context from any FTL templates
you might include in the screen in order to avoid name and variable space
If you want macros that are available in your FTL templates you should include
them in the desired FTL templates (you can use the component:// and other
Moqui-specific URLs for this).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.