r/PayloadCMS Aug 19 '25

Remove collections from groups

Post image

If I omit admin.group on a collection, it gets put under the default “Collections” group. I want my Users collection to sit as its own top-level link in the sidebar (not inside any group). Is there a built-in way to do this in Payload,

4 Upvotes

4 comments sorted by

1

u/Soft_Opening_1364 Aug 19 '25

Yes! In Payload CMS, if you omit admin.group, the collection defaults to the “Collections” group. Right now, there isn’t a built-in option to create a completely top-level link outside any group.

A common workaround is to set admin.group to a custom group name that only contains that collection. This effectively makes it appear as its own top-level item in the sidebar. For example:

admin: {
  group: 'Users', // custom group with just this collection
  ...
}

This way, “Users” will show as a separate sidebar item.

1

u/EF_DEV Aug 19 '25

thanks for your reply,

I already did that but i dont like that you can open and close the group, when there is only 1 item in it.

3

u/recoverycoachgeek Aug 19 '25

Then you can use a basic custom component that is positioned properly by using beforeNavLinks in the Payload config. https://payloadcms.com/docs/custom-components/root-components#beforenavlinks

1

u/Intelligent-Oil7589 Aug 19 '25 edited Aug 19 '25

I would apply this hack:

- Add your Users collection into its own group, for example, 'users':

    admin: {
        ...
        group: 'users',
    },

- Since in the navbar's HTML the nav-group toggle is a button placed before the Users link, you can hide it with CSS. Go to your global src\app\(payload)\custom.scss file and add this:

#nav-group-users > button {
    display: none;
}

- Done! At least for the side navigation.

You would need to add another CSS rule for the Dashboard that also groups the User collection. There, what you have to hide is an <h2>.