Re: Newbie question about macros and variables

Jeromy Evans <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Organization Blue Sky Minds Pty Ltd
Message-ID <[email protected]>
krishnan.1000 wrote:
> Hi,
>
>
>
> <#macro showText title data>
>   <td class = "h1">${title}</td><td>${data}</td>
> <#/macro>
>
>   

Is that just a type in the email?  It should read </#macro>

> I am passing something like this
>
> <@common.showText title="Name" data=${name} header = "h4" />
>
>
> name is specified in the HashMap root. 
>
>   
With the correction above, the following line works.

<@showText title="Name" data="${name}" />


Note the quotes around data.

I don't use @common so I can't comment on the header attribute.  It's 
not defined in your macro itself.


Hope that helps.
Jeromy Evans

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