November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
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
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.
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.
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:
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;
}
}
}
}
}
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...
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?