Try our conversational search powered by Generative AI!

ContentArea typeof with interface


Hi all i have structre like on the image:

My BaseArticle Page has content are that looks like this:

        [AllowedTypes(typeof(AgrifirmArticlePage), typeof(NuscienceArticlePage))]
        public virtual IList RelatedItems { get; set; }

My question is why i can't use IRelatedItem or IRelatedItemWithColor inside AllowedTypes. Also when i put BaseArticle page, it will work only for SiteA not for SiteB aritlce pages ( i guess this is due to some cache). 
I saw in alloy that there is one contentarea that uses allowtypes and IContent is passed as type, so i am wondering what i'm doing wrong ?

Kind Regards

Nov 29, 2016 11:00

Hi! You can, but you need to register them through a UI descriptor, like this:

public class RelatedItemUIDescriptor : UIDescriptor<IRelatedItem>

Then AllowedTypes should work. You can also change other types of behavior in the descriptor, please see

Nov 29, 2016 17:58

Hi Johan,

This work. Thanks for the help.


Nov 30, 2016 9:58
* 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.