Hide certain group settings if group name includes a specific name

Oh wait… I now suddenly see some methods to test. If Jinja2 works here, then indeed in g.json the group name is visible and can be used for a condition…

An no, that doesn’t work. And it’s not Jinja2, it’s Handlebars specific stuff (but I suppose contains is not a native function?).

{{#contains "chapter" group.name}}
<div class='control-group'>
    <label class="control-label">{{i18n 'admin.groups.my_map.map_title'}}</label>
    {{input type="checkbox" checked=group.custom_fields.show_map}}
    <span>{{i18n 'admin.groups.my_map.map_switch'}}</span>
</div>
{{/contains}}

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.

Error occurred:

- While rendering:
  -top-level
    application
      discourse-root
        group
          group.manage
            group.manage.profile
              groups-form-profile-fields
                plugin-outlet
                  plugin-connector

Uncaught Error: Attempted to resolve `contains`, which was expected to be a component, but nothing was found.