Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Stop macro in CMSDESK View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 1/15/2013 6:55:21 PM
   
Stop macro in CMSDESK
Hi Guys,

I have a created a custom macro (e.g. below)
                    case "someexpression":
e.Match = true;
e.Result = "Resolved expression";
break;

I would like this macro to run on the live site but not in cmsdesk.

Any ideas how to stop loading in CMSDESK.

Thanks
Gitesh Shah

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/15/2013 10:43:09 PM
   
RE:Stop macro in CMSDESK
This is for v5.5, it still works in v7. Take a look at this post: http://devnet.kentico.com/Forums/f45/fp27/t18261/Programatically-Determine-If-Running-CMS-Desk-o---.aspx

User avatar
Kentico Support
Kentico Support
kentico_janh - 1/16/2013 5:53:42 AM
   
RE:Stop macro in CMSDESK
Hello,

Yes, as it is mentioned in the link FroggEye posted above, you can take advantage of the PortalEngine.ViewMode property which can tell you what context is page loaded in.

Best regards,
Jan Hermann