Re: how to pass value from code to page template

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Friday, May 11, 2012, 11:29:35 PM, Daniel Dekany wrote:

> Friday, May 11, 2012, 7:54:43 PM, Daniel Dekany wrote:
>
>> Friday, May 11, 2012, 5:56:58 AM, S Ahmed wrote:
>>
>>> Also, how do I check for not null and not empty?
>>>
>>> <#if title??>
>>> </#if>
>>>
>>> that checks for null only, what if I want to know if it is an empty string? ie.. ""
>>
>>   <#if title!'' == ''>
>
> Ops... You wanted the inverse of the above, which is:
>
>    <#if title!'' != ''>

Also due to the know precedence bug you have to write this as:

  <#if (title!'') != ''>

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
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.