by dan
24. April 2009 12:19
Finding out whether you are in live system environment or whether you are in the management system is a no-brainer using the TemplateBase.IsLiveSystem property.
But what if you need to react on the operator switching to management system content edit mode?
In my case there has been a dynamic control rendering some flash content. The content in charge interacts with the html snippets generated to show the AxCMS.net handles in edit mode. So I had to turn off flash rendering while the operator tried to edit the dynamic templates content.
Luckily I remembered my colleague Sascha at inch-media who gave a presentation on a great shop system created using AxCMS.net some weeks ago. Confronted with my question he reacted in publishing a blog post that I will sum up here:
The undocumented AxContext.GetCMSMode() method does the trick! Casting the methods return value to WebControlConst.AECMSMode clearly shows you whether you are in content edit mode.