November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Check out Allans blogpost:
http://labs.episerver.com/en/Blogs/Allan/Dates/112230/8/Disabling-the-RightClickMenu/
/johan
Why did you remove the RightClickMenu attribute in CMS 5? It was very useful in CMS 4. Or did it move somewhere else?
Example:
Example disables the menu on a template
[RightClickMenu(Disabled=true)]
public class StandardPage : TemplatePage
{
(....)
}
hi,
If you want to disable DOPE (Direct On Page Edit) you can change to inherit from SimplePage, or set the episerver property "Editable" to false.
E.g. <episerver:property propertyname="PageName" runat="server" Editable='false' />
Search in the old 4.x. sdk for "editable" and you'll get more info.
-- Per
Unless my memory serves me wrong, wasn't there a simple change in the web.config that would turn off the right click menu completely?
We want to do it for the entire site, not just individual temples or controls.
I thought I had it solved. There's a class one can use (or so I thought).
RightClickMenuAttribute.Current.Disabled = true;
So I put this code in Page_Load but nothing happens! The right click menu pops up all the same.
So if anyone have suceeded in turning this off for a whole site at once, please tell.
I got rid of the contextmenu...
I changed to inherit from SimplePage on a page where I also have a stripped fckeditor.
I have the same issue, wanting to remove the DOPE, New and Quick-Edit options from the menu but leaving the other options.
The simple answer is to create your own class inheriting from TemplatePage and then, in hte onLoad event iterating through the ContextMenu's Items collection, switch those I don't want off.
string[] DisabledMenuOptions = WebConfigurationManager.AppSettings["DisabledMenuOptions"].Split(new char[] {'|'});
for (int i = 0; i < this.ContextMenu.Menu.Items.Count; i++ )
{
if (DisabledMenuOptions.Contains(this.ContextMenu.Menu.Items[i].Caption))
{
this.ContextMenu.Menu.Items[i].EnabledScript = "false";
}
}
In theWebConfig I have an appSetting called DisabledMenuOptions set to "Edit|Save and Publish|Cancel|New|Quick-edit".
Hope this helps?
Jim.
or use
ContextMenu.Options &= ~EPiServer.Web.PageExtensions.ContextMenuOption.OnPageEdit;
/Per
Ok this is an old one, long forgotten but we got a customer that wants to do it. Episerver 4.x
Can someone remind me how to disable the contextmenu (right click menu in doap)?
Thanks in advance!