gjshah7254
4/23/2014 - 9:55 PM

Macro - Live Site Only

Macro - Live Site Only

case "livesite":
                    e.Match = true;
                    string sLiveSite = "true";
                    string sGetDomain = CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{%domain%}");
                    if (!string.IsNullOrEmpty(sGetDomain))                    
                    {
                        if (sGetDomain.ToLower().Contains("staging"))
                        {
                            sLiveSite = "false";
                        }
                    }
                    e.Result = sLiveSite;
                    break;