Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
[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