Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
Maybye you could reuse this snippet. It allows you to change the root for the ContentReferences property editor dialog window.
public class ProductPage : StandardPage { ... [Display(Name = "Content References list", GroupName = SystemTabNames.Content, Order = 1000)] [CustomContentReferencesRoot] public virtual IList<ContentReference> TestContentReferences { get; set; } ... } [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public class CustomContentReferencesRootAttribute : Attribute, IMetadataAware { public void OnMetadataCreated(ModelMetadata metadata) { ExtendedMetadata extendedMetadata = metadata as ExtendedMetadata; if (extendedMetadata == null) return; extendedMetadata.EditorConfiguration["roots"] = new[] { ContentReference.StartPage.ID, 44, 45 }; // set roots id here based on custom logic } }
Howdy,
I've started using the ContentReferenceList property (see http://blog.huilaaja.net/2015/08/19/contentreferencelist-property-in-episerver-cms-8-6-0/).
Looks really good. Just one minor issue: we have a multisite setup. Each site uses 'Site-specific assets'.
If I go to a ContentReferenceList property, and click on the 'Browse' link, the dialog only shows the following:
Root
- Content Assets
- For All Sites
For This Page
I.E., it doesn't show the 'For This Site' folder. However, I can easily work around this issue by using the assets pane instead. But of course the assets pane isn't filtered by content type like the dialog.
Anyone else have the same issue?
Thanks,