Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Nested Macros in Transformation View modes: 
User avatar
Member
Member
usmaan - 6/21/2013 7:46:23 AM
   
Nested Macros in Transformation
I am trying to check the a boolean field in my transformation. If it is true, I want a <a href> tag to link the user to somewhere, otherwise, link them to somewhere else:

<%# Eval("DirectLinkFlag") == True ?%> <a href="<%#Eval("Link")%>"><%#Eval("DocumentName")%></a> : <%#Eval("DocumentName")%>



The above is not correct. Where am I going wrong?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/21/2013 8:07:17 AM
   
RE:Nested Macros in Transformation
Hi,

Macros are allowed in text or HTML transformations only. If you are using ASCX transformation, I would recommend using the IfCompare function.

Best regards,
Juraj Ondrus