This article demonstrates the Ektron code that can be used to detect the Server Type setting in the CMS>Settings>Setup>General Tab as seen in the image below.
The code below will retrieve the setting indicated above.
protected void Page_Load(object sender, EventArgs e)
{
Ektron.Cms.CommonApi capi = new Ektron.Cms.CommonApi();
if (!capi.EkSiteRef.RequestInformation.IsStaging)
{
Response.Write("This is a production site");
}
else
{
Response.Write("This is a staging site");
}
}
Please sign in to leave a comment.