Try our conversational search powered by Generative AI!

Disabling DOPE on all pages...

Vote:
 
Is there any simple way to disable direct on page editing mode on all pages of all pagetypes? Any javascript or web.config setting? Thank you for any help.
#12742
Aug 17, 2006 14:49
Vote:
 
Hi. Take a look in the SDK at the class RightClickMenuAttribute and the property EnableDope. You can add this attribute to all your templates, or you can have your own TemplatePage which inherit from the EPiServer.TemplatePage like this: [RightClickMenu(EnableDope=false)] public class MyTemplatePage : EPiServer.TemplatePage { } If you don't use the attribute on the class, you can do like this: private void MyTemplatePage_PreRender(object sender, EventArgs e) { string names = string.Empty; // display all names on the rightclickmenu for (int i = 0; i < RightClickMenu.Items.Count; i++) { names += string.Format("[{0}]",RightClickMenu.Items.Keys[i]); } RightClickMenu.Items.Remove("QuickNew"); } I guess you also can do this in the Global.asax private void TemplatePage_PreRender(object sender, EventArgs e) { TemplatePage tempPage = HttpContext.Current.Handler as TemplatePage; if (tempPage != null) { tempPage.RightClickMenu.Items.Remove("QuickEdit"); } } /Øyvind
#14817
Aug 23, 2006 14:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.