0

Hi all i'm getting values from JCR in CRXDe these are rendering fine, but i have an a little issue, i want if url field is null that time it doesn't show any destination HREF but i'm not getting success my code is as:

    <a href="<%= obj.get("url") %>"><%= obj.get("label") %></a>

and for another field i'm doing like this, which is working perfectly:

 <c:if test="${not empty properties.videoImage}">
    <img src="${properties.videoImage}" />
</c:if>

here i want to check "<%= obj.get("url") %>" is null so how can i do this, can anyone help me

Amit Sharma
  • 1,088
  • 1
  • 19
  • 44

1 Answers1

1

Did you tried the same solution something like this <a href="${not empty properties.videoImage?properties.videoImage:''}">${not empty properties.label?properties.label:''}></a> See this for more details.

Community
  • 1
  • 1
yash ahuja
  • 470
  • 1
  • 8
  • 23