Skip to content

Configure Content Properties

⏱ 10 minutes beginner

Properties control what editors see and enter for each content item. Well-configured properties reduce editing errors. They also group related fields into logical tabs so editors find what they need faster.

Every property needs a human-readable name and a sort position. Use the [Display] attribute to control both.

Display name and order
csharp
[Display(Name = "Hero Image", Description = "Banner image at the top of the page", Order = 10, GroupName = SystemTabNames.Content)]
[Required]
public virtual ContentReference HeroImage { get; set; }

[Display(Name = "Subtitle", Order = 20, GroupName = SystemTabNames.Content)]
[StringLength(200)]
public virtual string Subtitle { get; set; }
  1. Add [Display] to each property with Name, Order, and GroupName.
  2. Build the project and open the content type in the editor.
  3. Verify by checking that properties appear in the order you specified.

Tabs organize the editing form. Use GroupName to assign properties to tabs.

Custom tab grouping
csharp
[GroupDefinitions]
public static class CustomTabs
{
    [Display(Order = 10)]
    public const string Hero = "Hero Section";

    [Display(Order = 20)]
    public const string SEO = "SEO Settings";
}

// On your content type:
[Display(Name = "Meta Title", Order = 10, GroupName = CustomTabs.SEO)]
[StringLength(70)]
public virtual string MetaTitle { get; set; }
  1. Create a static class with [GroupDefinitions] attribute.
  2. Define tab names as const string fields with [Display(Order)].
  3. Reference your tab constants in each property’s GroupName.
  4. Verify by opening the editor. You should see your custom tabs in order.

Validation prevents editors from saving incomplete or incorrect data.

Validation attributes
csharp
[Required]
[Display(Name = "Page Title", Order = 5)]
public virtual string PageTitle { get; set; }

[Range(1, 100, ErrorMessage = "Must be between 1 and 100")]
[Display(Name = "Display Count", Order = 30)]
public virtual int DisplayCount { get; set; }

[RegularExpression(@"^https?://", ErrorMessage = "Must be a valid URL")]
[Display(Name = "External Link", Order = 40)]
public virtual string ExternalLink { get; set; }
  1. Add [Required] for mandatory fields.
  2. Use [StringLength], [Range], or [RegularExpression] for format rules.
  3. Build and test. Try saving without a required field. You should see a validation error.

Use [UIHint] to change how a property renders in the editing interface.

Editor hints
csharp
[UIHint(UIHint.Textarea)]
[Display(Name = "Summary", Order = 15)]
public virtual string Summary { get; set; }

[UIHint(UIHint.Image)]
[Display(Name = "Thumbnail", Order = 25)]
public virtual ContentReference Thumbnail { get; set; }
  1. Add the [UIHint] attribute with the desired editor type.
  2. Build and verify. The property should render with the specified editor widget.

Administrators can adjust property behavior from the CMS admin interface without modifying code. This is useful for changing display settings, adjusting priorities, or configuring language-specific property behavior after deployment.

Properties inherit settings from multiple levels. When the same setting is defined at more than one level, the CMS applies the most specific value.

  1. Navigate to Admin > Content Types and select a content type.
  2. Click the Properties tab to see all properties for that type.
  3. Select a property to view its settings. Notice the Defined at indicator, which shows whether the setting comes from code, the content type definition, or an admin override.
  4. Properties set in code (via attributes) serve as the baseline. Admin interface changes override code-level settings.
  5. Language-specific overrides (see below) take the highest priority.

The priority order from lowest to highest:

LevelSourceExample
1 - DefaultFramework defaultsDefault editor widget for string type
2 - CodeC# attributes[Display(Name = "Hero Image")]
3 - AdminAdmin interface overrideChanging display name to “Banner Image” in admin
4 - LanguageLanguage-specific overrideDifferent help text per language

Some properties need different help text, watermarks, or validation messages for each language.

  1. Navigate to Admin > Content Types and select a content type.
  2. Click the Properties tab and select the property you want to configure.
  3. Click the Language Settings tab.
  4. Select the language you want to customize.
  5. Enter language-specific values for Help Text, Watermark Text, or Description.
  6. Click Save.
  7. Verify by switching to that language in the editor. The property should display the language-specific text.

Edit tabs control how properties are grouped in the editor interface. Administrators can create, rename, reorder, and restrict access to tabs.

  1. Navigate to Admin > Content Types > Edit Tabs.
  2. Review the list of existing tabs. Each tab shows its Name, Display Name, Sort Index, and Access Level.

To create a new tab:

  1. Click Add Tab.
  2. Enter a Name (internal identifier, no spaces).
  3. Enter a Display Name (what editors see).
  4. Set the Sort Index to control the tab’s position. Lower numbers appear first.
  5. Set the Access Level to control who sees this tab:
    • Default: Visible to all editors.
    • Advanced: Visible only to users with advanced editing permissions.
    • Admin: Visible only to administrators.
  6. Click Save.

To modify an existing tab:

  1. Click the tab name in the list.
  2. Update the Display Name, Sort Index, or Access Level as needed.
  3. Click Save.
  4. Verify by opening a content item in the editor. Tabs should appear in the new order with the updated names.
IssueCauseFix
Property not visible in editorMissing [Display] attributeAdd [Display] with a Name value
Tab not appearingNo [GroupDefinitions] classCreate the class and reference it
Validation not enforcedAttribute on non-virtual propertyEnsure property is virtual