replicating nested if's from Velocity

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

replicating nested if's from Velocity

mdodge
This post was updated on .
Hello,
We are converting over from Velocity.  I am trying to figure out how to replicate this "nested if" chunk of code.  Also, if I have an object.field variable, do I need to first test if object is null then object.field is null?

Here is my old VM chunk:
#if(!$receiptInquiryResults || $receiptInquiryResults.empty)
  #if($receiptInquirySearchForm.sku == '' && $receiptInquirySearchForm.upc == '')
    <div id="nothingFound">No receipts for this month.</div>
  #else
    <div id="nothingFound">No receipts for this SKU/UPC.</div>
  #end
#else

Apparently this forum doesn't offer the ability to paste a code snippet elegantly like the other forums?