No announcement yet.

Limit Categories visible in link-category-tree?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Limit Categories visible in link-category-tree?

    I have advanced pack and have products and categories set up. I have created a contract module like the tutorial and have created a relationship to select the product category. I would like to know how I can exclude some of the categories from being selected and how to exclude some of them from the selection view.

    I have a parent category with subcategories and don't want the parent category to be selectable as there are no individual products listed under the parent category.

    The other thing is that I'd like to be able to limit which categories are available to select from for certain contracts. Is there a way to limit which categories are displayed?

    Any help is appreciated!

  • #2
    I'm revisiting this. I think that I have to create a custom view similar to the client/src/views/fields/link-category-tree.js

    I'm just not sure what or where to modify to limit out some of the categories and make the parent categories un-selectable.

    Would I need to make a custom view for the selectRecordsView: 'views/modals/select-category-tree-records', extended in the client/src/views/fields/link-category-tree.js ? I see some filters set in there, but I'm not sure where to focus my efforts.

    If so, is there an upgrade safe way to do that? Is there a simpler solution?