Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Macro OR and AND View modes: 
User avatar
Member
Member
Armysniper89 - 3/25/2011 1:00:47 AM
   
Macro OR and AND
If I am creating a macro such as this to control the visibility of a web part...

{%if (cmscontext.currentpageinfo.documentname == "About Us") { "false" } else { "true" }%}

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 3/25/2011 5:01:24 AM
   
RE:Macro OR and AND
Hi,

Unfortunately, there is not AND or OR functionality in context macros. You could create a custom macro, where you can implement requested functionality easily.

To get a document name in your custom macro, you could use code:
string name = CMSContext.CurrentPageInfo.DocumentName;


Best regards,
Ivana Tomanickova