Re: how to not call a macro if the varialbe is null?
Sushrut Bidwai <[email protected]> Sat, 28 Dec 2013 09:34:23 +0530
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CAPwE3BDBvJBZa7SMFWCyh01V+SD1wMaVvuYNUaSYL6uhZNzrTA@mail.gmail.com> |
You can selectively call a macro. <#if var2??> <@v.someThing variable2 /> </#if> ?? - Is the operator to check if the variable is null or not. On Sat, Dec 28, 2013 at 4:04 AM, S Ahmed <[email protected]> wrote: > I am calling a macro like this: > > <@u.listUsers users variable2 variabe3 /> > > > And inside of listUsers.ftl I have: > > .. > .. > > <@v.someThing varaible2 /> > > > Now say variable2 is null, is it possible to do soething like: > > if variable2 != null > { > <@v.someThing variable2 /> > } > > > meaning, don't call this macro if the varialbe is null. > > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > > -- Best Regards, Sushrut http://wisebuy.in ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user