Check if You are in Content Edit Mode Programmatically

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.

Dan Wucherpfennig - AxCMS.net evangelist

Dan Wucherpfennig is an IT consultant employed at EDV-Partner (http://www.edvpartner.de), a Hamburg based system integration and consulting company. 

Having many years of experience in developing projects with AxCMS.net, Dan has been awarded as an AxConsultant during the AxDays 2008.

Calendar

<<  July 2010  >>
MoTuWeThFrSaSu
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

View posts in large calendar