I’ve created a custom plugin to include some extra fields for groups. But they only apply to groups with the name “chapter” in it. So it doesn’t make sense to have them in groups for other purposes. Is there some way I can create a condition that checks e.g. if chapter in group.name; then chapter = true?
I have the following:
I want to hide the control group at the top if the group name does not have the word chapter in it. I seem to already use some Jinja2 stuff from the example I used. If that’s anything like other Jinja2, then I can certainly create such a condition there. But then I need to know a few things.
If Jinja2 is fully available, how can I access the group name variable to create the condition?
But that doesn’t work, I get a bunch of errors. I probably don’t use the right variable lookup. Although replacing group.name with simply "chapter_netherlands" also fails.
- While rendering:
Uncaught Error: Attempted to resolve `contains`, which was expected to be a component, but nothing was found.