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, 1:30:03 AM, krishnan.1000 wrote:
> Hi,
>
> I am using FreeMarker (v 2.3.12) for the first time. So I hope that this is
> not a stupid question. I am creating a html file using free marker and
> dynamic values. Basically what I want to do is this
>
> <#macro showText title data>
> <td class = "h1">${title}</td><td>${data}</td>
> <#/macro>
>
> I am passing something like this
>
> <@common.showText title="Name" data=${name} header = "h4" />
>
> name is specified in the HashMap root.
>
> Is there something I am doing wrong? Please help me.
Yes, like not telling what the error message is. Anyway, it doesn't
mater in this case, as I see the mistake: data=${name} is wrong, it
should be just data=name. ${} is used only in the static text and
inside string literals.
--
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/