Re: [Freemarker-user] macro override

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Monday, December 21, 2009, 1:06:06 AM, Daniel Dekany wrote:

> Sunday, December 20, 2009, 7:52:07 PM, Argyro Kazaki wrote:
>
>> Halo all,
>>
>> I have two files, a.ftl and b.ftl and this is also the order in which 
>> they are loaded.
>>
>> Within a.ftl I have the following macro:
>>
>> <#macro foo pojo>
>>     <#-- do stuff with pojo -->
>> </#macro>
>>
>> Within b.ftl I have a macro with the same signature, which naturally 
>> overrides the first (because b.ftl it is loaded after a.ftl):
>>
>> <#macro foo pojo>
>>     <#-- do stuff with pojo -->
>> </#macro>
>>
>> Is there a way to call the first macro within the latter? I am trying to
>> achieve something similar like overriding java methods and still being
>> able to call super implementation.
>
> Unfortunately no. In FreeMarker macros are just variables. So when you
> import b.ftl,

I meant, when you *include* b.ftl...

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.