Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Hiding tabs on pagetype depending on user group


Is it possible to hide/display the tabs that are displayed when editing a page on different groups.

 I know that I can hide/display the tabs depending on "accessright" but I would like to do it by groups if it's possible.


Oct 16, 2008 11:05

You could try this in Global.asax.cs:

public void Application_Start(object sender, EventArgs e) {
   EditPanel.LoadedPage += new LoadedPageEventHandler(EditPanel_LoadedPage);

private void EditPanel_LoadedPage(EditPanel sender, LoadedPageEventArgs e) {
   if (e.Page.PageTypeName != "MyPageTypeName") // Modify this

   int tabIdToHide = 10; // Modify this

   foreach (PropertyData prop in e.Page.Property) {
      if (prop.OwnerTab == tabIdToHide && !EPiServer.Security.PrincipalInfo.CurrentPrincipal.IsInRole("MyRole"))
         prop.OwnerTab = -1;

Edited, Oct 17, 2008 10:34
I guess that code is for CMS 5? Coould it be done in a similiar way in 4.62B
Oct 21, 2008 13:55
* 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.