November Happy Hour will be moved to Thursday December 5th.

Is there any way to hide the settings tab?

Vote:
 

Hi!

I wonder if there is any way to hide the default settings tab in forms edit mode, either completly or for a certain user group?

#75714
Oct 04, 2013 9:31
Vote:
 

Hey,

When i go to CMS --> Admin, and open the tab 'Config' there is a menu item called 'Edit Tabs'.
On the 'Edit Tabs' page i can specify a 'Required Access Level' for a certain tab.

I've never used it myself, but i guess this could possibly solve your problem.

Greetings, Martijn

#75720
Oct 04, 2013 10:20
Vote:
 

The "Edit tabs" feature that Martijn is talking about will only take effect when you're working in the legacy edit mode (that's when you go to /episerver/cms/edit), not in the new on-page or forms edit modes.

Also, this doesn't let you hide tabs on a group basis, only specific access levels (read, change, publish etc).

In the new edit mode, they don't use the same tabs as in earlier versions. For example, "Shortcut" used to have its own tab when editing a page. This tab could be hidden using the "Edit tab" config.
In EPi 7, Shortcut is a property under the "Settings" tab in forms edit mode, which opens its own modal dialog box. 

So in short, there's no built-in solution to your question.

 

#75726
Oct 04, 2013 10:56
Vote:
 

Actually, we do honor the settings for tabs in the new user interface. If you do not have the required permission to access a tab is should not be visible and properties on "hidden tabs" should not be editable when using on page editing either.

Regarding the built in tabs, the tab with the text "Settings" in the editorial interface somewhat confusingly matches the tab "Advanced" in the administrative interface. The reason for this is that there is a localized text for this in the translation files.

#75737
Oct 04, 2013 13:03
Vote:
 

Guess I made a hasty assumption based on testing the "Shortcut" tab, then.

But since the new forms edit only has the default tabs SEO, Content, Settings, how do the old tab names under "Edit tabs" map to the new tabs?

(apart from Advanced = Settings that Linus already mentioned). Surely some of the tabs won't take effect (like my Shortcut example)?

 EDIT: To answer my own question:

  • Old tab "Information" corresponds to new tab "Content"
  • Old tab "Advanced" corresponds to new tab "Settings"
  • Old tab "Metadata" corresponds to new tab "SEO" (sortindex is -1 by default, need to change this to >= 0 to be able to save config)

 

#75741
Edited, Oct 04, 2013 13:14
Vote:
 

Thank you guys, this solves my problem!

#75742
Oct 04, 2013 13:28
Vote:
 

Given the information that Kalle just blogged about, here's a code sample on how to hide/show a tab dynamically:

using System;
using System.Collections.Generic;
using System.Threading;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.Shell.ObjectEditing;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;

namespace EPiServer.Templates.Alloy
{
  [EditorDescriptorRegistration(TargetType=typeof(ContentData))]
  public class SiteMetadataExtender : EditorDescriptor
  {
    public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
    {
      if (Thread.CurrentPrincipal.IsInRole("GroupToHaveAccess"))
      {
        return;
      }

      foreach (ExtendedMetadata property in metadata.Properties)
      {
        if (property.GroupSettings != null && String.Equals(property.GroupSettings.Name, SystemTabNames.Settings, StringComparison.OrdinalIgnoreCase))
        {
          property.GroupSettings.DisplayUI = false;
          return;

        }
      }
    }
  }
}

#75743
Edited, Oct 04, 2013 13:56
Vote:
 

The code above works for me in a CMS 8 plain vanilla Alloy environment. Guessing that you just found the cause of the issue since you just edited your comment...

#118993
Mar 18, 2015 14:37
Vote:
 

Thanks Linus!

It works perfect :)

#171285
Edited, Nov 04, 2016 15:28
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.