Friday, October 12, 2018, 9:26:58 PM, Ingo Mahnke wrote:

> Thank you Daniel!!!
> This works. Freemarker is a powerfull system.
>
>
> Now is it possible with "a" has a Parameter?
> Something like this?
>
> <#macro a param1>
> ${param1}
> </#macro>
>
> <#macro b x>
>  <@x/>
> </#macro>
>
>
> <@b x=(a param1="hallo world")/>

No, there's no construct for currying. So you had to define a macro
with #macro that calls <@a param1="hallo world">, and then pass that
macro as parameter, which is certainly too verbose for your purpose.

Actually, it's maybe not be that hard to add a built-in for
currying... like a?curry(param1="hallo world").

> Thank you very much!
>
> Ingo
>
>
>
>> Gesendet: Freitag, 12. Oktober 2018 um 21:13 Uhr
>> Von: "Daniel Dekany" <[email protected]>
>> An: "Ingo Mahnke" <[email protected]>
>> Betreff: Re: Directive as input for an other directive
>>
>> Friday, October 12, 2018, 5:46:19 PM, Ingo Mahnke wrote:
>> 
>> > Hallo!
>> >
>> >
>> > <#macro a>
>> > ...
>> > </#macro>
>> >
>> > <#macro b x>
>> > ${x}
>> > </#macro>
>> >
>> > <@b x=a />
>> >
>> > Is this possible?
>> 
>> Yes, but since it's a directive, you can't print it with ${x},
>> instead, you can call it like <@x/>.
>> 
>> > Thank you very very much.
>> >
>> > Ingo
>> >
>> 
>> -- 
>> Thanks,
>>  Daniel Dekany
>> 
>> 
>

-- 
Thanks,
 Daniel Dekany

Reply via email to