[Freemarker-user] macro override

Argyro Kazaki <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
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.

Is it possible to do something like this within b.ftl so that the inner 
@foo call be redirected to super implementation? (of course now ends 
with a StackOverflowError)

<#macro foo pojo>
    <#-- do stuff with pojo -->
    <@foo pojo />
</#macro>


Thanks,
Argyro Kazaki


------------------------------------------------------------------------------
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.