Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Reverse a Macro value View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
slycknick - 1/27/2010 9:14:16 AM
   
Reverse a Macro value
I must just be missing something simple but I just can't get this to work.

I'm trying to invert the result of a macro value.
I want to use {%currentuser.useriseditor%} for use with a visibility property but I only want it visible if the value is false.

Does anyone know the answer?

Thanks,
Nick


User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 1/27/2010 10:23:36 AM
   
RE:Reverse a Macro value
Hello,

The simplest way would be tu use the equals/notequals parameter. Please find an example bellow:

Returns true if the culture is en-US:

<%# CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{%cmscontext.currentdocumentculture.culturecode|(default)(equals)en-US%}")%>

Best regards,
Boris Pocatko