Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Add elements to collection page

default discord avatar
akacronos2 years ago
3

I want to add some features to the collection page (not the create doc). Is this possible? (like a download button)

  • discord user avatar
    denolfe
    2 years ago

    You can swap in your own components. It sounds like you may want a custom cell component (which shows on the list view). You can pair this with a UI field type if you don't want to replace it for one of your existing fields.



    https://payloadcms.com/docs/admin/components#cell-component

    You'd place this component under the field's admin -> components -> Cell property

  • default discord avatar
    akacronos2 years ago

    I don't want to add something to the list, I want to add a download button on the general page. Is this possible?



    something like this example, or maybe next to filters/columns

  • discord user avatar
    denolfe
    2 years ago

    You are able to swap out the entire List view by passing the following configuration on your collection:


      admin: {
        components: {
          views: {
            List: MyCustomListView
          }
        }
      }


    Here is the default List view for reference:

    https://github.com/payloadcms/payload/blob/master/src/admin/components/views/collections/List/Default.tsx
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.