Re: [Freemarker-user] macro override

Guo Du <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
On Mon, Dec 21, 2009 at 1:25 PM, Daniel Dekany <[email protected]> wrote:
> How would this work?
Line 1: <@foo pojo /> <#--macro from a.ftl-->
Line 2: <#include "b.ftl">
Line 3: <@foo pojo /> <#--macro from b.ftl-->

When FM evaluate line 1, it will lookup macro from exist variables and
it will resolved to macro in a.ftl.
After FM evaluate line 2, the macro variables will be overrrided to
macro in b.ftl.
When FM evaluate line 3, it will use the macro which will come from b.ftl.

Little trick :)

-Guo

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