Jan 17, 2018
Feb 02, 2018
CMS UI
Closed, Fixed and tested
If ContentArea or ContentReferenceList is read-only, it's not possible to navigate to children.
For example, if property is not Culture Specific and a user is viewing content in a language branch, the Editor has to change the editing context to the master language.
Steps to reproduce:
1. Add ContentArea and ContentReferenceList read-only properties to model
[Display(GroupName = SystemTabNames.Content, Order = 340)] [Editable(false)] public virtual IList<ContentReference> ContentReferences { get; set; } [Display(GroupName = SystemTabNames.Content, Order = 340)] public virtual IList<ContentReference> ContentReferences2 { get; set; }
2. Override SetDefaultValues method and assign deafult values:
public override void SetDefaultValues(ContentType contentType) { base.SetDefaultValues(contentType); this.ContentReferences = new[] {ContentReference.StartPage, new ContentReference(7) /* Alloy Track */}; var relatedContentArea = new ContentArea(); relatedContentArea.Items.Add(new ContentAreaItem { ContentLink = ContentReference.StartPage }); relatedContentArea.Items.Add(new ContentAreaItem { ContentLink = new ContentReference(9) /* Alloy Meet */ }); this.RelatedContentArea = relatedContentArea; }
3. Run the site and add a new page.
Expected: It is possible to navigate to ContentArea/ContentReferenceList children.
Actual: The Readonly property doesn't support navigation.