Try our conversational search powered by Generative AI!

How to show customized text for Allowed Types using UIHint in CMS12 ?


Currently, My project is built on CMS12 in .Net5.

  1. I want to show customized text under "You can add these content types" for Allowed Types in CMS Editor. I was used UIHint to display customized names but it's not rendering as mentioned. 
    • Please refer to image reference:
  2. I want to show the customized title of "Select content Dialog box" when we clicked on Browse link in content editor page
    • Please refer to image reference:


Vijay J

Edited, Nov 24, 2021 12:01

Hello Vijay,

I have noted that you are using a List<ContentReference> field instead of a standard ContentArea field.  I would recommend utilizing the standard Content Area as this has additional functionality over List<ContentReference> type.

The UIHint does not work the way you're expecting it to do so in those images.  The UIHint attribute is used to indicate to EPiServer what type of control should be used to handle the field.  e.g. decorating a ContentReference field with [UIHint(UIHint.Image)] tells the UI to render an image picker/preview. It has no bearing on the language used.

As an easy alternate you can populate the [Display()] attribute with a description for your field like so:

    Name = "Hero Image",
    Description = "The image to render at the top of the page",
    GroupName = SystemTabNames.Content,
    Order = 10)]
public virtual ContentReference HeroImage { get; set; }

    Name = "Heading",
    Description = "The H1 to display",
    GroupName = SystemTabNames.Content,
    Order = 20)]
public virtual string Heading { get; set; }

    Name = "Main Content Area",
    Description = "You can add a General Content Page or a Rich Text Block here.",
    GroupName = SystemTabNames.Content, 
    Order = 30)]
public virtual ContentArea MainContentArea { get; set; }

The description renders as hint when hovering over the name of the field, but with a little CSS magic you can make it appear directly under the title like so:

To customise the CMS UI styles, you will need to create a css stylesheet, you can then reference it in modules.config like so (it does bother me slightly that we are still using XML config files in CMS 12):

<?xml version="1.0" encoding="utf-8"?>
    <add name="epi-cms.widgets.base" path="~/Styles/cms-styles.css" resourceType="Style"/>
Edited, Nov 26, 2021 17:45
* 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.