Hi everyone,
In a structure field, is it possible to query options from another structure field located in the parent page, but also depending on a the content of field from the same row ?
Explanations,
A repository.php page contains a card.php page.
The repository.yml parent blueprint contains a structure field for creating filters :
filters:
type: structure
fields:
category:
type: text
options:
type: tags
The card.yml child blueprint contains the inheritedFilters, using a inherited-editable-structure field plugin that extends the original structure field.
The plugin initialize the field with rows coming from the parents. In each row, the category is fullfilled regarding the parent and locked but the tags must be editable. The options must match those defined in the parent structure field, in the row that has the same category.
inheritedFilters:
type: inherited-editable-structure
fields:
category:
type: text
options:
type: tags
options:
type: query
query: ???
I tried different approaches, using queries, custom field props logics, custom site methods, programmable blueprints…. I keep failing at getting the category of the current row so I can’t get the corresponding options.
Hope my explanations are clear. Do you have any idea ?
Thanks a lot for your help.