cancel
Showing results for 
Search instead for 
Did you mean: 

reusing macros on webscripts

dloureiro
Champ in-the-making
Champ in-the-making
Hi,
I've lots of scripts that are using macros to output content metadata as xml.

The problem i'm facing is that, in every template i've to do the same output, i've in the .ftl file repeated (copy & paste) all the macros i need. When i need to change one , i've to change all the files where i'm using the 'same' macro

It's possible to have the macros on a separated file and import it in the templates where needed and from one template execute one macro from another?

something like

<#assign macro = search.findNode("workspace://SpacesStore/c189b089-be11-11dc-a16e-6fac0b341fb1")>
<@macro.printdocprops doc=document />

Thanks in advance
10 REPLIES 10

dloureiro
Champ in-the-making
Champ in-the-making
Web Scripts
If you want it use includes in Web Scripts you should use paths relative to the Web Script classpath
Thanks mike for clarifying this. Now i understand the correct behavior.

Regards