Re: Use #nested as a variable.

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Saturday, September 4, 2010, 8:00:22 PM, hernani wrote:

>
> Hello all, I'm kinda new to freemarker, but I'm converting some very complex
> stuff, so my requirements are a bit high :)
>
> I'm trying to create a couple of macros that require to use whatever content
> is in the #nested directive as other macros or methods arguments. Is this
> possible? How?

If I understand well what do you want, the closest you can get is
capturing the output of <#nested> into a variable like this:

  <#local nestedContent><#nested></#local>

(Or the same with #assign, of course.)

Passing the nested content as some kind of closure that you can
execute later is not possible, unfortunately.

> thanks in advance

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
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.