Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Oh, I just realised I had forgotten about `UIHint.CatalogEntry` and `UIHint.ProductVariation` - but I quickly tried those:
[Display(
GroupName = SystemTabNames.Content,
Order = 7)]
[UIHint(UIHint.CatalogEntry)]
[AllowedTypes(typeof(VariantContent))]
public virtual ContentArea TestC { get; set; }
[Display(
GroupName = SystemTabNames.Content,
Order = 7)]
[UIHint(UIHint.ProductVariation)]
[AllowedTypes(typeof(VariantContent))]
public virtual ContentArea TestD { get; set; }
And they (with the ContentArea) still only bring up the media picker.
This is a known issue I think. I know I logged a bug for it, will try to find it ...
That's promising, thanks for the reply Quan - this codebase is long overdue an v13.x upgrade - they're on 13.19 (~2020), do you think it might have been fixed by the latest version (v13.37)?
No as far as I am aware the bug is not fixed. Finding it is a bit tricky though because I'm not quite sure if I created it or just looked at it in the past.
Hmm, I think this is different. Mine is specific to using a ContentArea where I want to target Variations only. But leading Bug - CMS-30744 it sounds like it's more about the `AllowedTypes` and the example is with a `ContentReference`
it's basically that [AllowedTypes(typeof(EntryContentBase))] attribute can't be applied to nested ContentReference property (inside a block or a ContentArea). I can't say with 100% certain they are the same bug, but they are likely linked
Hi, I've also encountered this problem and the bug mentioned above (CMS-30744) has "Closed, Won't Fix" as state. Would be a nice thing to have though as editors now have to drag content from the right side panel in order to add Node-items to a ContentArea. I'm on Commerce 14.33.0.
I've worked with Commerce for quite a while, so am not sure how it was in the past, but I expected UIHint.CatalogContent to work with a ContentArea property:
[Display( Name = "Test A", GroupName = SystemTabNames.Content, Order = 5)] [UIHint(UIHint.CatalogContent)] [AllowedTypes(typeof(VariantContent))] public virtual ContentArea TestA { get; set; }
But, when clicking "Browse existing content" it results in the UI picker just showing the media items.
However, if I have a ContentReference:
[Display( Name = "Test B", GroupName = SystemTabNames.Content, Order = 8)] [UIHint(UIHint.CatalogContent)] [AllowedTypes(typeof(VariantContent))] public virtual ContentReference TestB { get; set; }
It loads the UI picker (by clicking the elipse next to the content reference) and as intended, this browses the catalog content in the pop up.
Is this expected? Is UIHint.CatalogContent just not compatible with ContentArea?