In late December Kentico released version 5 As you can see it has tons of new features and updates across the entire system This is the first of several webinars focused on providing detailed technical information on version 5. Our focus today is one of my favorites and a new feature called UI personalization. UI personalization is a feature that impacts many different areas across Kentico CMS 5 Fundamentally UI personalization is designed to increase the productivity of business users by enabling system administrators to provided a simplified and customized user interface within CMS DESK. Typical scenarios would allow system administrators to reduce the amount of tabs, menu items and different parts of a page that a user would see within the Kentico UI. Allowing the end user to focus on the tasks they need to get their jobs done. Let’s start by taking at look at some of the fundamentals for UI personalization
Implementing UI Personalization in Kentico CMS 5 required additional re-factoring of how the application is structuredThe term modules is nothing new but an important term to keep in mind when talking about UI personalizationBy definition modules contain UI elementsThese elements consist of tabs, menu items and groups of controls and are what is hidden from the usersThe screen shot you can see here represents an example of a customized CMS DESK – Tools Tab. As you can see the module CMS DESK has UI personalization applied that hides various menu items or UI elements from this user. Whether a UI Element is shown or hidden is based on role security
At runtime a composite is created of all the roles a user belongs to called a UI profileIf at least one role the user belongs to makes the element visible it is displayed. As an example using the picture we can we see how this worksThe user is a member of Role 1 and Role 2For role 1 they have access to UI element 1 and 2 in module 1For role 2 they have access to UI element 1 in module 2At runtime their UI profile provides an interface that will display in Module 1 – UI Element 1 and 2Module 2 – UI element 1The benefit and why this is so important to this architecture is that UI profiles are site related. This means that a user is able to see a personalized UI when editing one site and a completely different UI when editing another siteThis is because a users UI profile is dependent on roles and roles are site related. Users can be a member of any number of roles across all sites in the system. Let’s take a look at an example of UI personalization using the corporate sample site.
Included in the sample corporate site is a sample user Andrew Jones with the username andyAndy is a special user and contains very restricted UI permissions so that he can focus on a couple of key areasLet’s take a lookLogin in to CMS DESK as administrator and show full interfaceShow andy’s roleAdministrator ->Users ->Andy -> RolesLogin as andyShow missing Administration tabShow restricted WYSIWYG editorRestricted My DeskRestricted ToolsSelect content and Home Page and go into properties and show limited number of options available.Lets look at how UI personalization is enabled
Before we get into the particulars of setting up UI personalization. It’s important to ensure that you have it enabled using Site Manager – settings – security Within this screen you have two thingsFirst you can enable UI personalization globally or per siteAlso, ensure that you have Enable UI Personalization setLet’s take a look at how UI personalization works in more detail
As we said earlier UI Personalization is applied to the CMS DESK. Site Manager doesn’t provide any personalization at this time as it is typically used by administrators and developers who need the full UIWithin CMS DESK personalization is available for UI elements that I have listed. There are a ton of possible combinations available from these for exampleThe four main tabs in CMS desk can be hiddenThe content tab probably offers the most possibilitiesHiding any of the main tabs in edit modeOn the design tab you customize pretty much all of the editing actionsWithin web part properties dialog you can hide their tabsFor the properties tab you can control the visibility of most of the UI elements including parts of General, URLs, Template, Metadata, menu and security pagesFor the My DESK tab you can hide the menus and all tabs on the my Profile pageFor the tools and Administration tab you can hide all the menu itemsOne of my favorites is that all the action buttons on the WYSIWYG Editor can be hiddenThe Media Dialog displayed when using the insert image or insert link in the WYSIWYG editor and Editable image web part allows the hiding of the dialog tabsAs you can see there are some incredible possibilities especially when you add in that you can add your own elements. Given our limited time today there is lots of additional information and examples available in the documentation.Let’s take a look at how we can make these things happen
Fundamentally there are two key menu items that are used when working with UI personalizationThe Modules screen is used to define the available UI elementsThe UI Personalization screen is used to set the permissions on those elementsLet’s take a quick look at these screens using the sample corporate site
Site Manager – Development – ModulesDemo 1 - For each - Show user interface (can add new element, can reorder, select item and check roles)Drill into Content (PG 1)Drill into WYSIWYG editor (Pg 2)Demo 2Andy who we looked at earlier was a CMS basic user if you remember he was missing the Administration tab in CMS DeskSelect CMS DESK – roles and show how not selected for CMS BASIC UsersSite Manager – Administration – UI PersonalizationContinuing to look at the CMS BASIC users let’s look at what they have availableSelect CMS Basic User role and cycle threw modulesLets look at how we can add our own custom elements
As we saw a couple of minutes ago we add custom elements UI elements using Site Manager -> Development ->Modules screen. Within this screen we then select the new UI element option and complete the following information •Display name: name of the element displayed in the administration interface thiscan be entered either as plain text or as a localizable string in the {$mystringname$} format•Code name: unique module name of the element used by web site development•Element is custom: When not selectedthe element is considered a native part of the Kentico CMS. Make sure to set this value for your custom UI elements•Caption: caption of the UI element displayed in the rendered UI this can be entered either as plain text or as a localizable string in the {$mystringname$} format•Target URL: URL of the page which is the content of the UI element. This can be an absolute (ex. http://www.google.com) orrelative (e.g. ~/CMSModules/Content/CMSDesk/Default.aspx) URLs•Icon path: This is only for menu items and sets the icon displayed next to element caption. You can enter eithera full relative path beginning with ~ for example ~/App_Themes/Default/Images/CMSModules/list.pngor a short path starting under the images folder (ex.CMSModules/list.png)Let’s go ahead and add some new UI Elements