Re: Newbie question about macros and variables

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Tuesday, March 11, 2008, 3:35:15 AM, Jeromy Evans wrote:

[snip]
> With the correction above, the following line works.
>
> <@showText title="Name" data="${name}" />
>
> Note the quotes around data.
[snip]

It will work, but the "${}" is needless, and actually slows down
template execution a bit. You should just write:

  <@showText title="Name" data=name />

The left side of the = is similar to JavaScript expression, you see,
so "Name" is a string literal, and name is a variable reference.

-- 
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
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.