# Hide certain group settings if group name includes a specific name

**URL:** <https://meta.discourse.org/t/hide-certain-group-settings-if-group-name-includes-a-specific-name/237917>\
**Category:** Development\
**Created:** [September 2, 2022, 8:25am UTC](https://meta.discourse.org/t/hide-certain-group-settings-if-group-name-includes-a-specific-name/237917 "2022-09-02T08:25:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![AquaL1te](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aqual1te/32/201966_2.png) [@AquaL1te](https://meta.discourse.org/u/AquaL1te)\
**Post date:** [September 2, 2022, 8:27am UTC](https://meta.discourse.org/t/hide-certain-group-settings-if-group-name-includes-a-specific-name/237917/2 "2022-09-02T08:27:55Z")

</div>

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](https://getpublii.com/dev/contains-helper/) (but I suppose `contains` is not a native function?).

```yaml
{{#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.

```plaintext
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.

```

---

_[View the full topic](https://meta.discourse.org/t/hide-certain-group-settings-if-group-name-includes-a-specific-name/237917)._
