Geta / geta-optimizely-categories

An alternative to Optimizely's default category functionality, where categories are instead stored as localizable IContent.
5 stars 10 forks source link

Creating a Category Property for a Page via the Optimizely CMS UI #34

Open geonetric-matt opened 4 months ago

geonetric-matt commented 4 months ago

Greetings:

I’ve added ProductCategory and NewsCategory properties to our ProductPageData class(inherits from EPiServer PageData) in the code. These properties are visible from the Optimizely CMS UI by going to Settings->Content Types->ProductPage:

image

image

Additionally, I have added a Search Category to ProductPage using the Optimizely CMS Admin UI(rather than code) by selecting Settings->Content Types->Product->Add Property:

image

When adding a Category via code, the Allowed and Restricted content types are specified in the [AllowedTypes] attribute:

image

A notable difference when adding a Category content type via the UI is that the Allowed Content Types and Restricted Content Types appear as settings in the UI under Configure Properties.

The issue that I'm seeing is that the drop-down list of content values for Allowed Content Types and Restricted Content Types do not have any Category Types in the select list. Instead, Page, Block and Media content types appear in the select list:

image

image

Just reaching out to see if it is possible to 'register' the Category content types so that they appear in the Allowed & Restricted Content Type drop-down select lists when creating a new Category property for a Page via the UI? If Allowed and Restricted Types cannot be specified via the UI today, then is this possibly a future enhancement that should be added to the Geta Category App in the future?

Regards, Matt