# Nieuwe kolommen toevoegen aan gebruikerslijsten in groepen

**URL:** https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598
**Category:** Development
**Created:** [26 april 2024 om 16:21 UTC](https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598 "2024-04-26T16:21:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![frye\_bradley](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@frye\_bradley](https://meta.discourse.org/u/frye_bradley)
#### Post date: [26 april 2024 om 16:21 UTC](https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598/1 "2024-04-26T16:21:48Z")

</div>

Is it possible to add additional columns to the user lists in groups? I have a plugin that I’m attempting to add functionality to, which is adding a column to the users list in groups showing whether a user is Active, Suspended, Silenced, or Deactivated. It looks like the group-index Handlebars template and group-index controller is what I need to target for this, but there isn’t a plugin outlet so I’m wondering what the correct way of adding a new column would be, if that’s able to be done. I’m new to Discourse development so I could be missing something here, but would greatly appreciate any tips. I’ve read through these development guides which are great resources, but I’m currently stuck.

- [Beginner’s guide to developing Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-developing-discourse-themes/93648)
- [Developing Discourse Plugins](https://meta.discourse.org/t/developing-discourse-plugins-part-1-create-a-basic-plugin/30515)

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [26 april 2024 om 17:48 UTC](https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598/2 "2024-04-26T17:48:55Z")

</div>

Hello, welcome to meta 👋

You can use the `group-index-table-header-after-username` and `group-index-table-row-after-username` outlets to insert a header/row next to the username column.

For example:

 ![image](https://global.discourse-cdn.com/meta/original/4X/8/8/2/882389ce9e851d6dc18a81a4437744ea95ea5440.png)

For the header, you can use the `TableHeaderToggle` component.  
For the row, you can use for example `<div class="directory-table __cell directory-table__ cell--status">{{this.args.member}}` – you can access data with `{{this.args.member}}`

You will need to fix the grid CSS to include a new column.

```css
.group-members--can-manage {
    grid-template-columns: 3fr repeat(5, minmax(min-content, 1fr)) 3em;
                                      ^
}

```

If you want to move the column, the positioning is a bit tricky because of `display: contents`; however, using `order` can work.

On a side note, you might have issues getting the user’s status. In my tests, the data was not reflected in `member` with a user suspended or silenced (`silencedTillDate` or `suspendedTillDate` are undefined). I’m not sure if there is a bug here. I did not dig up more, for now!

I hope that helps.

---

<div class="post-metadata">

### Author: ![frye\_bradley](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@frye\_bradley](https://meta.discourse.org/u/frye_bradley)
#### Post date: [26 april 2024 om 20:34 UTC](https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598/3 "2024-04-26T20:34:34Z")

</div>

Great, thank you! This helps a lot. I’m realizing now that I wasn’t seeing the `group-index-table-header-after-username` and `group-index-table-row-after-username` outlets because the site is using an outdated version of Discourse (2.7).

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [26 april 2024 om 20:48 UTC](https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598/4 "2024-04-26T20:48:14Z")

</div>

You’re welcome!. 2.7! That’s quite old, indeed. 😄

As a side note, I would highly encourage you to use this component: [(deprecated) Plugin outlet locations theme component](https://meta.discourse.org/t/plugin-outlet-locations-theme-component/100673). Super useful! 👍

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [26 mei 2024 om 20:48 UTC](https://meta.discourse.org/t/adding-new-columns-to-user-lists-in-groups/305598/5 "2024-05-26T20:48:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
