Relation widget, filter by previous field value_field #7350
Unanswered
secsonthebeach
asked this question in
Q&A
Replies: 1 comment
-
@secsonthebeach this is not currently possible. You can rephrase this as a feature request and open an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have been trying and failing at an attempt to use a previous relation widget “value_field” as the ‘filters: value:’ argument for a second relation widget. Should this be possible? Would this be similar to this question:
#7300
Specifically, I have a Hugo site where I am pulling in the Mitre ATT&CK data for reference and taxonomy tagging. My expected use case is an author creates new content using DecapCMS, and can apply taxonomy tags to their content, to reference the Mitre data.
I currently have hidden collections for all of the Mitre content, and am able to use the relation widget to provide authors with a drop-down for selecting what’s available. However, without some filtering, some of the available lists of content are very large and each of these could be applied to new content in ways that break the existing Mitre ATT&CK relations.
I would like to create a scenario where the author selects one of the 3 Mitre ‘domains’, which is then used as a filtering mechanism for available options of Mitre ‘tactics’. Similarly, The selected ‘tactic’ would be used in filtering the applicable ‘techniques’.
The existing Mitre content is such that the filtering/relations could be performed in either direction. Meaning: a selected domain can provide a list of nested tactics, or all of the available tactics could be filtered by their frontmatter which contains the domain tag.
I expected the following to work, but it has not:
The domain widget properly applies the frontmatter, and manually applying the literal string properly filters the Tactics, but I am unable to pass the variable as an argument.
I am interested to hear any thoughts and ideas!
Beta Was this translation helpful? Give feedback.
All reactions