Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring Geta.Optimizely.Categories 'Select Categories' tree #35

Open
geonetric-matt opened this issue Apr 25, 2024 · 1 comment
Open

Comments

@geonetric-matt
Copy link

geonetric-matt commented Apr 25, 2024

Greetings:

I'm new to Geta.Optimizely.Categories and to Optimizely CMS and I have built a Categories prototype with using the Alloy demo site. Everything seems to be working well and I can control my categories in the way that's needed except for one case...

In my 'Select Categories' tree, I need to only display the parent-child category types for a given category and only child types should be selectable(allowed). I've tried the following combinations of appsettings and AllowedType attribution but, at best, have only been able to meet 2 of my 3 goals.

I'm hoping that you can provide some guidance about whether all 3 goals can be achieved and, if so, how to go about achieving it -or- if this is a new capability that should be added to the App?

Regards,
Matt

Goals:

In Select Categories tree:

  1. Display ProductCat1(parent) as RestrictedType
  2. Display ProductChildCat1 & ProductChildCat2 as AllowedTypes
  3. Do not display any other parent types such as NewsCat1 and SearchCat1

image

Try 1:

Config:

  • AllowedTypes: ProductCat1, ProductChildCat1 & ProductChildCat2
  • HideDisallowedRootCategories = true

Result: In Select Categories tree

  1. Fail-ProductCat1(parent) displays as an AllowedType
  2. Pass-ProductChildCat1 & ProductChildCat2 display as AllowedTypes
  3. Pass-Do not display any other parent types such as NewsCat1 and SearchCat1

image

Try 2:

Config:

  • AllowedTypes: ProductChildCat1 & ProductChildCat2
  • RestrictedTypes: ProductCat1
  • HideDisallowedRootCategories = true

Result: In Select Categories tree -

  1. Fail-ProductCat1(parent) does not display.
  2. Fail-ProductChildCat1 & ProductChildCat2 do not display.
  3. Pass-Do not display any other parent types such as NewsCat1 and SearchCat1

image

Try 3:

Config:

  • AllowedTypes: ProductChildCat1 & ProductChildCat2
  • RestrictedTypes: ProductCat1
  • HideDisallowedRootCategories = false

Result: In Select Categories tree -

  1. Pass-Display ProductCat1(parent) as RestrictedType
  2. Pass-Display ProductChildCat1 & ProductChildCat2 as AllowedTypes
  3. Fail-Do not display any other parent types such as NewsCat1 and SearchCat1

image

@JoshuaFolkerts
Copy link

I know awhile back, I think we used to be able to pass a content reference as the root to show where to start the tree from loading from. Ideally, passing in the start reference for the tree, would handle the above requests and the tree would just start form that content reference. I tried overriding Roots but fails to respect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants